bpo.helpers package¶
Submodules¶
bpo.helpers.apk module¶
- bpo.helpers.apk.get_abuild_version(lines)¶
- Get the abuild version from the .PKGINFO file inside an apk generated
by abuild. In contrary to all other key=value pairs in the file, this is just stored as comment on top. We need it to figure out if the apk was built with a broken version of abuild, that generated broken packages (#56).
- param lines:
list of
- -terminated lines as bytes from .PKGINFO file,
as returned by get_pkginfo_lines() :returns: version string like “3.4.0-r1” or None
- bpo.helpers.apk.get_metadata(apk)¶
- Parameters:
apk – path to apk file :returns: ordered dict with relevant metadata from .PKGINFO: {“abuild_version”: “3.5.0_rc1-r1”, “pkgver”: “1-r3”, “origin”: “hello-world-wrapper”}
NOTE: as shown in the example, pkgver is actually the full version ($pkgver-r$pkgrel)! NOTE: entries appear in the same order, as they appear in the .PKGINFO.
- bpo.helpers.apk.get_pkginfo_lines(apk)¶
bpo.helpers.headerauth module¶
- bpo.helpers.headerauth.header_auth(header, token)¶
bpo.helpers.job module¶
- bpo.helpers.job.get_job_service()¶
- bpo.helpers.job.get_link(job_id)¶
- Returns:
the web link, that shows the build log
- bpo.helpers.job.get_status_image(image)¶
- bpo.helpers.job.get_status_package(package)¶
- bpo.helpers.job.get_status_repo_bootstrap(rb)¶
- bpo.helpers.job.init()¶
Initialize the job service (make sure that tokens are there etc.)
- bpo.helpers.job.job_check_rate_limit(action, arch, branch, pkgname, version, device, ui, dir_name)¶
Check if there is a bug and we keep running the same job (bpo#141). If that is the case, shutdown bpo.
- bpo.helpers.job.job_service_is_local()¶
Use this to run additional code only with the local job service.
- bpo.helpers.job.remove_additional_indent(script, spaces=12)¶
Remove leading spaces and leading/trailing empty lines from script parameter. This is used, so we can use additional indents when embedding shell code in the python code.
- bpo.helpers.job.run(name, note, tasks, branch=None, arch=None, pkgname=None, version=None, device=None, ui=None, dir_name=None)¶
- Parameters:
note – what to send to the job service as description, rendered as markdown in sourcehut
branch – of pmaports to check out before running the job
- Returns:
ID of the generated job, as passed by the backend
- bpo.helpers.job.update_status()¶
- bpo.helpers.job.update_status_image()¶
- bpo.helpers.job.update_status_package()¶
- bpo.helpers.job.update_status_repo_bootstrap()¶
bpo.helpers.pmb module¶
- bpo.helpers.pmb.get_pmos_mirror(branch, mirror_type='main', add_branch=False)¶
- bpo.helpers.pmb.is_master(pmaports_branch)¶
Is using pmbootstrap master, instead of 2.3.x
- bpo.helpers.pmb.set_repos_task(arch, branch, add_wip_repo=True)¶
Configure repositories for pmbootstrap v3
- bpo.helpers.pmb.should_add_wip_repo(branch)¶
The WIP repository always needs to be added when running with sourcehut. It is not needed when using the local job service since there the WIP packages get copied into the work directory before the test starts. However it is desirable to add it there too if possible, to check if the URL gets generated correctly and is usable.
Module contents¶
- exception bpo.helpers.ThisExceptionIsExpectedAndCanBeIgnored¶
Bases:
Exception
Expected exception from the testsuite, that sometimes shows up on the terminal (multithreading, yay) while running the testsuite. It would be better to hide it, but I could not find a feasible way in a reasonable amount of time.