pkgsetcomp package¶
Submodules¶
pkgsetcomp.pkgsetcomp module¶
- class pkgsetcomp.pkgsetcomp.PkgComparison[source]¶
Bases: pkgsetcomp.pkgsetcomp.PkgComparison
A package set comparison namedtuple with serializers
- pkgsetcomp.pkgsetcomp.compare_package_lists(manifest, installed)[source]¶
Compare two sets (manifest, installed) of package names.
Parameters: - default (iterable) – names of packages listed in a given MANIFEST
- installed (iterable) – names of packages installed locally
Returns: set comparison outputs
Return type: PkgComparison
- pkgsetcomp.pkgsetcomp.ensure_file(command, filename, overwrite=False, shell=False)[source]¶
Run a command if a file doesn’t exist
Parameters: - command (str) – shell command to subprocess.call
- filename (str) – path to os.path.exists
- overwrite (bool) – if true, overwrite existing file
- shell (bool) – subprocess command parsing
Returns: None
- pkgsetcomp.pkgsetcomp.get_installed_packages(cache=False, output_dir='.', output_filename='installed.pkgs.txt')[source]¶
Get a list of the packages in a manifest
Parameters: manifest_url (str) – path or URL of a debian/ubuntu .manifest file Returns:
- pkgsetcomp.pkgsetcomp.get_manifest_packages(cache=False, manifest_url=None, output_dir='.', output_filename='manifest.pkgs.txt')[source]¶
Get a list of the packages in a manifest
Parameters: manifest_url (str) – path or URL of a debian/ubuntu .manifest file Returns:
- pkgsetcomp.pkgsetcomp.get_package_lists(manifest_url='/var/build/user_builds/pkgsetcomp/checkouts/latest/pkgsetcomp/../tests/testdata/ubuntu-12.04.4-desktop-i386.manifest', cache=False, output_dir=None)[source]¶
Get list of installed packages and manifest packages
- Generate:
- installed.pkgs.txt manifest.pkgs.txt
Parameters: cache (bool) – whether to cache Returns: tuple of lists: (installed, manifest) Note
adapted from: http://unix.stackexchange.com/a/3624
- pkgsetcomp.pkgsetcomp.pkgsetcomp_packages_with_manifest(manifest_url, output_dir)[source]¶
Compare installed packages with manifest packages
Parameters: - manifest_url (str) – URL (or local path) to a debian/ubuntu .manifest
- output_dir (str) – directory in which to write .pkg.sh and pkg.txt files
Returns: output of compare_package_lists
Return type: PkgComparison
pkgsetcomp.pyrpo module¶
Module contents¶
pkgsetcomp module