libka package

Subpackages

Submodules

libka.acctest_noinline module

libka.acctest_noinline.acc_test_add_no_keep_inline()[source]
libka.acctest_noinline.signal_handler(signal, frame)[source]

libka.control_edit module

libka.control_edit.add_to_relations(package, relation, target, wrap_relation=False)[source]
libka.control_edit.bump_version(package, relation, target, version, operator='>=')[source]
libka.control_edit.bump_version_with_map(package, relation, pkg_version_map)[source]
libka.control_edit.dump_control(filename, src_pkg, bin_pkg_list, bin_pkg_map)[source]
libka.control_edit.parse_control(filename)[source]
libka.control_edit.remove_from_relations(package, relation, target, wrap_relation=False, operator=None, version=None)[source]
libka.control_edit.sanitize_control_file(filename)[source]

libka.gbp_plugins module

This module just provides the get_gbp_plugins_path function which provides the gbp-plugins/ directory full path.

libka.gbp_plugins.get_gbp_plugins_path()[source]

This function gives the gbp-plugins/ directory path. This path may be different depending if you installed Kubuntu Automation from git or from the *.deb package, hence why we need this function.

libka.git_checks module

libka.git_checks.checkUnpushedGitChanges()[source]
libka.git_checks.getMaxTag(prefix='')[source]
libka.git_checks.kubuntuCheckValidBranch(distribution=None, interactive=True, master_accepted=True)[source]

libka.gitattributes module

libka.gitattributes.create_gitattibutes_file(verbose=False)[source]
libka.gitattributes.create_gitattributes_file_and_commit(verbose=False)[source]

libka.ka_configuration module

This module provides functions to operate with Kubuntu Automation configuration

libka.ka_configuration.getConfigParser(create_template=False)[source]

DEPRECATED: use get_ka_config_parser instead.

libka.ka_configuration.get_ka_config_parser(create_template=False)[source]

Returns a config parser with the KA configuration.

libka.ka_data_utils module

This module provides a few functions to operate with the data provided by the ka-metadata repository.

libka.ka_data_utils.getDataFilesPath()[source]

DEPRECATED: use get_data_files_path instead

libka.ka_data_utils.get_data_files_path()[source]

Returns the current data files path.

libka.ka_data_utils.readJsonDataFile(file_name, catch_exceptions=True)[source]

DEPRECATED: use read_json_data_file instead.

libka.ka_data_utils.readPackagesFile(file_name, catch_exceptions=True)[source]

DEPRECATED: use read_packages_file instead.

libka.ka_data_utils.read_bd_relations_file(file_name, nodoc=False, catch_exceptions=True)[source]

Returns a map with the file contents, stipping comments.

Comments may start with ‘//’

If nodoc is True, the build dependencies marked with <!nodoc> will be ignored.

If nodoc is False, the build dependencies marked with <!nodoc> will be taken into account, removing the final “<!nodoc>” string, for instance if a source package has an entry in the file like this:

"qt3d-opensource-src": [
    "qtbase-opensource-src",
    "qtdeclarative-opensource-src",
    "qtbase-opensource-src<!nodoc>",
    "qtdeclarative-opensource-src<!nodoc>",
    "qttools-opensource-src<!nodoc>"
]

it will be processed like this:

"qt3d-opensource-src": [
    "qtbase-opensource-src",
    "qtdeclarative-opensource-src",
    "qttools-opensource-src"
]
libka.ka_data_utils.read_json_data_file(file_name, catch_exceptions=True)[source]

Returns a JSON map with the file contents, stripping comments.

Comments may start with ‘//’

libka.ka_data_utils.read_packages_file(file_name, catch_exceptions=True)[source]

Return a list of packages, stripping comments starting with #

libka.ka_print module

Small library providing utility print functions used by Kubuntu Automation

libka.ka_print.ka_disable_logs()[source]

Disable logging of anything printed by ka_print_*().

libka.ka_print.ka_enable_logs(file_name)[source]

Enable logging of everything printed by ka_print_*(), file_name is the full path of the log file.

libka.ka_print.ka_print_error(string, end='\n')[source]

Prints string using the error color (red).

libka.ka_print.ka_print_git_diff(title='git')[source]

Prints the git diff of the current directory

libka.ka_print.ka_print_good_stuff(string, end='\n')[source]

Prints string using the Good Stuff color (green).

libka.ka_print.ka_print_info(string, end='\n')[source]

Prints string using the info color (blue).

libka.ka_print.ka_print_plain(string, end='\n')[source]

Prints string without using any special color.

libka.ka_print.ka_print_warning(string, end='\n')[source]

Prints string using the warning color (red).

libka.ka_wrap_and_sort module

libka.ka_wrap_and_sort.field_order_index(field, field_order)[source]
libka.ka_wrap_and_sort.ka_wrap_and_sort()[source]
libka.ka_wrap_and_sort.sort_binary_package_fields(bin_pkg)[source]
libka.ka_wrap_and_sort.sort_control_fields(src_pkg, bin_pkg_list, bin_pkg_map)[source]
libka.ka_wrap_and_sort.sort_paragraph_fields(p, field_order)[source]
libka.ka_wrap_and_sort.sort_source_fields(src_pkg)[source]

libka.kci module

libka.kci.is_kci_paused()[source]

libka.kde_ftp module

This module provides utilities to deal with the upstream FTP’s where source code tarballs are published

libka.kde_ftp.download_tarballs_from_kde_sftp(release_type)[source]

Downloads all the tarballs from depot for the specified release type.

Returns True if the tarballs were sucessfully downloaded.

libka.kde_ftp.getFtpVersionMap(releaseType)[source]

DEPRECATED: use get_ftp_version_map instead

libka.kde_ftp.get_ftp_version_map(release_type)[source]

Returns a map where the key is the upstream tarball name and the value is the version.

The release_type parameter is the release type; “qt”, “frameworks”, “plasma” or “applications”.

libka.kubuntu_ppa module

This module just provides the KubuntuPPA class

class libka.kubuntu_ppa.KubuntuPPA(release_type)[source]

Bases: object

This class represents a Kubuntu PPA

get_full_name()[source]

Returns the full name string of the PPA.

get_ppa_name()[source]

Retuns the name of the PPA, removing the username from the beginning.

get_user_name()[source]

Returns the user name of the PPA.

libka.package_info module

libka.package_info.getReleaseType(upstream_name=None)[source]
libka.package_info.isNativePackage()[source]
libka.package_info.upstreamGitName()[source]
libka.package_info.upstreamNameFromWatch()[source]

libka.parse_build_log module

libka.parse_build_log.get_autopkgtest(log, testname, package)[source]

libka.qtwebkit_releases_html_parser module

Module providing the QtWebKitReleasesHTMLParser class.

class libka.qtwebkit_releases_html_parser.QtWebKitReleasesHTMLParser[source]

Bases: HTMLParser

Class to parse the HTML of the webkit releases and find out the latest upstream release.

get_latest_version()[source]

Returns the latest QtWebkit version after parsing the HTML releases page

handle_starttag(tag, attrs)[source]

Process all HTML tags, detect links which may point to *.tar.xz source code releases.

parse_releases_url()[source]

Parses QtWebkit releases url.

libka.remove_broken_debian_breaks module

libka.remove_broken_debian_breaks.read_bin_pkg_name_list()[source]
libka.remove_broken_debian_breaks.remove_broken_debian_breaks()[source]
libka.remove_broken_debian_breaks.signal_handler(signal, frame)[source]
libka.remove_broken_debian_breaks.strip_broken_debian_breaks(src_pkg, bin_pkg_list, bin_pkg_map)[source]

libka.tritemiolib module

This module provides various functions to operate with tritemio’s wannabuild and reprepro setup.

libka.tritemiolib.tritemio_bin_nmu(dist, arch, src_package_name, changelog_entry='Rebuild.')[source]

Performs a binNMU of the given package

libka.tritemiolib.tritemio_copysrc(origin_dist, destination_dist, src_package_name)[source]

Copy the given source package from origin_dist to destination_dist

libka.tritemiolib.tritemio_exec_reprepro(command, retry_number=10, retry_delay=3, exit_on_error=True)[source]

Executes the given reprepro command at tritemio

libka.tritemiolib.tritemio_exec_ssh(user, host, command, retry_number=10, retry_delay=3, exit_on_error=True)[source]

Executes the given ssh command at tritemio

libka.tritemiolib.tritemio_give_back(dist, arch, src_package_name)[source]

Performs a give-back of the given package

libka.tritemiolib.tritemio_list_all_srcs(dist)[source]

Returns a list of all source package names available in a given tritemio distribution

libka.tritemiolib.tritemio_ls(package_name, arch='any')[source]

Returns the output of reprepro ls at tritemio

libka.tritemiolib.tritemio_pkglist(release_type, dist)[source]

Finds out a package list for a given tritemio distribution, for instance, tritemio_pkglist(‘other’,’ubuntu-exp3’) would give you a list of the source pakcages which are available in ‘ubuntu-exp3’ and are not part of qt/frameworks/plasma/applications

libka.tritemiolib.tritemio_removesrc(dist, src_package_name)[source]

Removes given package from given distribution

libka.ubuntu_info module

This module provides various utilities to operate with ubuntu release codenames and versions.

libka.ubuntu_info.previous_ubuntu_version(version)[source]

Returns the previous Ubuntu version.

Example: previous_ubuntu_version(“19.10”) should return “19.04”.

libka.ubuntu_info.ubuntu_dist_name_from_version(version)[source]

Returns the Ubuntu distribution codename from version.

Example: ubuntu_dist_name_from_version(“19.10”) should return “eoan”

libka.ubuntu_info.ubuntu_dist_version_from_name(dist_name)[source]

Returns the Ubuntu distribution version from its codename.

Example: ubuntu_dist_version_from_name(“eoan”) should return “19.10”.

libka.update_sv_field module

libka.update_sv_field.get_sv_field(filename='debian/control')[source]
libka.update_sv_field.update_sv_field(value)[source]
libka.update_sv_field.update_sv_field_and_commit(value)[source]

libka.update_vcs_fields module

libka.update_vcs_fields.signal_handler(signal, frame)[source]
libka.update_vcs_fields.update_vcs_fields()[source]

libka.wrap_control module

libka.wrap_control.sort_list(unsorted_list)[source]
libka.wrap_control.wrap_field(control, entry, wrap_always, short_indent, trailing_comma=True, sort=True)[source]

Module contents