mini_buildd.changes module¶
-
class
mini_buildd.changes.
LogPath
(repository, source, version, create=False)¶ Bases:
object
Package log path: REPOID/PACKAGE/VERSION.
-
class
mini_buildd.changes.
Changes
(file_path)¶ Bases:
debian.deb822.Changes
-
FILE_APX
= ''¶
-
classmethod
match
(file_path)¶
-
property
key
¶ Key to identify if a ‘Package’ (Upload, Buildrequest, Buildresult).
-
property
bkey
¶ Key to identify a ‘Build’ (Buildrequest, Buildresult).
-
property
distribution
¶
-
cget
(field, default=None)¶
-
cset
(field, value)¶
-
classmethod
gen_changes_file_name
(package, version, arch, apx='')¶ Gen any changes file name.
Always strip epoch from version, and handle special mini-buildd types.
>>> Changes.gen_changes_file_name("mypkg", "1.2.3-1", "mips") 'mypkg_1.2.3-1_mips.changes' >>> Changes.gen_changes_file_name("mypkg", "7:1.2.3-1", "mips") 'mypkg_1.2.3-1_mips.changes' >>> Changes.gen_changes_file_name("mypkg", "7:1.2.3-1", "mips", apx=Buildrequest.FILE_APX) 'mypkg_1.2.3-1_mini-buildd-buildrequest_mips.changes' >>> Changes.gen_changes_file_name("mypkg", "7:1.2.3-1", "mips", apx=Buildresult.FILE_APX) 'mypkg_1.2.3-1_mini-buildd-buildresult_mips.changes'
-
gen_file_name
(arch, apx)¶
-
classmethod
gen_dsc_file_name
(package, version)¶
-
property
dsc_name
¶
-
property
dsc_file_name
¶
-
property
file_name
¶
-
property
file_path
¶
-
property
buildlog_name
¶
-
get_log_path
()¶
-
is_new
()¶
-
get_spool_id
()¶
-
get_spool_dir
()¶
-
get_files
(key=None)¶
-
add_file
(file_name)¶
-
save
(gnupg=None)¶ Write to file (optionally signed).
>>> import tempfile >>> t = tempfile.NamedTemporaryFile() >>> c = Changes(t.name) >>> c["key"] = "ASCII value" >>> c.save(None) >>> c["key"] = "Ünicöde «value»" >>> c.save(None)
-
upload
(endpoint, force=False)¶
-
tar
(tar_path, add_files=None, exclude_globs=None)¶
-
untar
(path)¶
-
move_to_pkglog
(installed, rejected=False)¶
-
remove
()¶
-
fields
()¶
-
to_json
()¶
-
-
class
mini_buildd.changes.
Upload
(file_path)¶ Bases:
mini_buildd.changes.Changes
-
class
Options
(upload_changes)¶ Bases:
object
Uploader options in changes.
>>> f"{Upload('test-data/changes.options').options}" "auto-ports=['jessie-test-unstable', 'squeeze-test-snasphot'], autopkgtest-mode=errfail, internal-apt-priority=543, lintian-mode=errfail, piuparts-mode=errfail"
>>> f"{Upload('test-data/changes.options_1.0').options}" "auto-ports=['jessie-test-unstable', 'squeeze-test-snasphot'], internal-apt-priority=543, lintian-mode=errfail, lintian-mode[i386]=disabled"
>>> f"{Upload('test-data/changes.options_0.8').options}" "auto-ports=['jessie-test-unstable', 'squeeze-test-snasphot'], lintian-mode=ignore"
-
class
Bool
(raw_value)¶ Bases:
object
-
class
Int
(raw_value)¶ Bases:
object
-
class
Str
(raw_value)¶ Bases:
object
-
class
CSV
(raw_value)¶ Bases:
object
-
KEYWORD
= 'MINI_BUILDD_OPTION'¶
-
classmethod
usage
()¶
-
get
(key, alt=None, default=None)¶ Get first existing option value in this order: key[a], key, default.
-
class
-
property
distribution
¶
-
check_mode
(checker, alt, fallback_mode_int)¶ Get check mode from upload options, with fallback.
-
gen_buildrequests
(repository, dist, suite_option)¶ Build buildrequest files for all architectures.
Todo
IDEA: gen_buildrequests(): Instead of tar’ing ourselves (uploaded changes) with exceptions (.deb, .buildinfo, .changes), add the .dsc and its files only!
-
raw_text
: Optional[bytes]¶
-
gpg_info
: Optional[GpgInfo]¶
-
class
-
class
mini_buildd.changes.
Buildrequest
(file_path)¶ Bases:
mini_buildd.changes.Changes
-
FILE_APX
= '_mini-buildd-buildrequest'¶
-
check_mode
(checker)¶ Get check mode from checker (lintian, piuparts, autopkgtest).
-
check_extra_options
(checker)¶ Get check mode from checker (lintian, piuparts, autopkgtest).
-
property
live_buildlog_name
¶
-
get_live_buildlog_loc
()¶
-
get_live_buildlog_url
()¶
-
upload_buildrequest
(local_endpoint)¶
-
gen_buildresult
(path=None)¶
-
raw_text
: Optional[bytes]¶
-
gpg_info
: Optional[GpgInfo]¶
-
-
class
mini_buildd.changes.
Buildresult
(file_path)¶ Bases:
mini_buildd.changes.Changes
-
FILE_APX
= '_mini-buildd-buildresult'¶
-
raw_text
: Optional[bytes]¶
-
gpg_info
: Optional[GpgInfo]¶
-
-
mini_buildd.changes.
select
(file_path)¶
-
class
mini_buildd.changes.
Log
(distribution, source, version, create=False)¶ Bases:
mini_buildd.changes.LogPath
-
installed
()¶
-