daklib.cruft¶
helper functions for cruft-report
@contact: Debian FTPMaster <ftpmaster@debian.org> @copyright 2011 Torsten Werner <twerner@debian.org>
Functions
|
Returns a query that selects all distinct package names from suite ordered by package name. |
|
Finds newer versions in lowersuite_name than in highersuite_name. |
|
This one is really complex. |
|
searches for NBS packages based on metadata extraction of the newest source for a given suite |
|
searches for arch: all packages from suite that do no longer reference a source package in the same suite |
|
Reports binary packages built from multiple source package with different names. |
Classes
|
A binary package identified by its name which gets built by multiple source packages in a suite. |
|
A source package identified by its name with all of its versions in a suite. |
- class daklib.cruft.DejavuBinary(suite: Suite, package: str)[source]¶
A binary package identified by its name which gets built by multiple source packages in a suite. The architecture is ignored which leads to the following corner case, e.g.:
If a source package ‘foo-mips’ that builds a binary package ‘foo’ on mips and another source package ‘foo-mipsel’ builds a binary package with the same name ‘foo’ on mipsel then the binary package ‘foo’ will be reported as built from multiple source packages.
- class daklib.cruft.NamedSource(suite: Suite, source: str)[source]¶
A source package identified by its name with all of its versions in a suite.
- daklib.cruft.get_package_names(suite: Suite)[source]¶
Returns a query that selects all distinct package names from suite ordered by package name.
- daklib.cruft.newer_version(lowersuite_name: str, highersuite_name: str, session, include_equal=False) list[tuple[str, str, str]] [source]¶
Finds newer versions in lowersuite_name than in highersuite_name. Returns a list of tuples (source, higherversion, lowerversion) where higherversion is the newest version from highersuite_name and lowerversion is the newest version from lowersuite_name.
- daklib.cruft.queryNBS(suite_id: int, session)[source]¶
This one is really complex. It searches arch != all packages that are no longer built from current source packages in suite.
temp table unique_binaries: will be populated with packages that have only one version in suite because ‘dak rm’ does not allow specifying version numbers
temp table newest_binaries: will be populated with packages that are built from current sources
subquery uptodate_arch: returns all architectures built from current sources
subquery unique_binaries_uptodate_arch: returns all packages in architectures from uptodate_arch
subquery unique_binaries_uptodate_arch_agg: same as unique_binaries_uptodate_arch but with column architecture aggregated to array
subquery uptodate_packages: similar to uptodate_arch but returns all packages built from current sources
subquery outdated_packages: returns all packages with architectures no longer built from current source
- daklib.cruft.queryNBS_metadata(suite_id: int, session)[source]¶
searches for NBS packages based on metadata extraction of the newest source for a given suite
- daklib.cruft.query_without_source(suite_id: int, session)[source]¶
searches for arch: all packages from suite that do no longer reference a source package in the same suite
subquery unique_binaries: selects all packages with only 1 version in suite since ‘dak rm’ does not allow to specify version numbers