mini_buildd.changes module¶
-
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_pkglog_dir(installed, relative=True)¶ Get package log dir.
Package log path for this changes file: REPOID/[_failed]/PACKAGE/VERSION/ARCH
In case the changes is bogus (i.e, cannot produce a valid path for us, like a wrong distribution), None is returned.
-
get_pkglog_url(installed)¶
-
get_buildlog_path(installed)¶
-
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()¶
-
-
class
mini_buildd.changes.Upload(file_path)¶ Bases:
mini_buildd.changes.Changes-
class
Options(upload_changes)¶ Bases:
objectUploader options in changes.
>>> f"{Upload('test-data/changes.options').options}" "auto-ports=['jessie-test-unstable', 'squeeze-test-snasphot'], ignore-lintian=True, ignore-lintian[i386]=False, internal-apt-priority=543, run-lintian=True, run-lintian[i386]=False"
>>> f"{Upload('test-data/changes.magic').options}" "auto-ports=['jessie-test-unstable', 'squeeze-test-snasphot'], ignore-lintian=True"
-
class
Bool(raw_value)¶ Bases:
object
-
class
Int(raw_value)¶ Bases:
object
-
class
CSV(raw_value)¶ Bases:
object
-
KEYWORD= 'MINI_BUILDD_OPTION'¶
-
get(key, alt=None, default=None)¶ Get first existing option value in this order: key[a], key, default.
-
class
-
property
distribution¶
-
gen_buildrequests(daemon, 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'¶
-
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]¶
-