bpo.api package

Submodules

bpo.api.job_callback.build_image module

bpo.api.job_callback.build_image.get_dir_name(request)
bpo.api.job_callback.build_image.get_files(request)

Get all attached files and verify their names.

bpo.api.job_callback.build_image.get_image(session, branch, device, ui, job_id)
bpo.api.job_callback.build_image.get_path_temp(job_id)

One image consists of multiple files. They get big, especially with the so now we upload only one file at once and put them into this temp dir until all of them are uploaded. :param job_id: already sanitized ID of the image build job :returns: the temporary upload path for the current job

bpo.api.job_callback.build_image.job_callback_build_image()
bpo.api.job_callback.build_image.upload_finish(session, image, path_temp, dir_name)
bpo.api.job_callback.build_image.upload_new_files(path_temp, files)

Receive one or more files and put them into the temp path.

bpo.api.job_callback.build_image.verify_previous_files(request, path_temp)

bpo.api.job_callback.build_package module

bpo.api.job_callback.build_package.job_callback_build_package()

bpo.api.job_callback.get_depends module

bpo.api.job_callback.get_depends.get_payload(request, arch)

Get the get_depends callback specific payload from the POST-data and verify it.

bpo.api.job_callback.get_depends.job_callback_get_depends()
bpo.api.job_callback.get_depends.remove_deleted_packages_db(session, payload, arch, branch)

Remove all packages from the database, that have been deleted from pmaports.git :returns: True if packages were deleted, False otherwise

bpo.api.job_callback.get_depends.update_or_insert_packages(session, payload, arch, branch)

Update/insert packages from payload into the database, with all information except for the dependencies. These need to be set later, because that needs to happen after each package has an ID assigned. Otherwise we will get duplicates in the database (resulting in errors from the unique pkgname-arch index).

bpo.api.job_callback.get_depends.update_package_depends(session, payload, arch, branch)

bpo.api.job_callback.repo_bootstrap module

bpo.api.job_callback.repo_bootstrap.fail_callback(session, rb, reason)
bpo.api.job_callback.repo_bootstrap.get_repo_bootstrap(session, request)
bpo.api.job_callback.repo_bootstrap.job_callback_repo_bootstrap()

bpo.api.job_callback.sign_index module

bpo.api.job_callback.sign_index.job_callback_sign_index()
bpo.api.job_callback.sign_index.save_apkindex(request)

bpo.api.public.update_job_status module

bpo.api.public.update_job_status.public_update_job_status()

bpo.api.push_hook.gitlab module

bpo.api.push_hook.gitlab.get_branch(payload)

Get branch from payload and validate it.

bpo.api.push_hook.gitlab.get_pkgnames_commits(payload)

Get modified pkgnames from changed (added, modified, removed) files in payload, along with the commit hashes where they were modified. :returns: dict like: {“hello-world”: “d34dc4fef00”, …}

bpo.api.push_hook.gitlab.push_hook_gitlab()
bpo.api.push_hook.gitlab.reset_failed_packages(pkgnames_commits, branch)

Reset failed packages, which might be fixed by the packages that were modified. These are the packages from the paramter and all packages that depend on them. :param pkgnames_commits: from get_pkgnames_commits()

Module contents

bpo.api.get_apks(request)

Get all attached apks and verify the file names.

bpo.api.get_arch(request, branch)

Get architecture from X-BPO-Arch header and validate it.

bpo.api.get_branch(request)

Get branch from X-BPO-Branch header and validate it.

bpo.api.get_file(request, filename)
Returns:

werkzeug.datastructures.FileStorage object

bpo.api.get_header(request, key)
bpo.api.get_package(session, request)
bpo.api.get_version(request, package)