Part of lp.archivepublisher.domination View In Hierarchy
Packages are marked as superseded when they become obsolete.
|Method||__init__||Initialize the dominator.|
|Method||planPackageDomination||Plan domination of publications for a single package.|
|Method||findBinariesForDomination||Find binary publications that need dominating.|
|Method||dominateBinaries||Perform domination on binary package publications.|
|Method||findSourcesForDomination||Find binary publications that need dominating.|
|Method||dominateSources||Perform domination on source package publications.|
|Method||findPublishedSourcePackageNames||Find currently published source packages.|
|Method||findPublishedSPPHs||Find currently published source publications for given package.|
|Method||dominateSourceVersions||Dominate source publications based on a set of "live" versions.|
|Method||judge||Judge superseded sources and binaries.|
|Method||judgeAndDominate||Perform the domination and superseding calculations|
|Method||_sortPackages||Partition publications by package name, and sort them.|
|Method||_setScheduledDeletionDate||Set the scheduleddeletiondate on a publishing record.|
|Method||_judgeSuperseded||Determine whether the superseded packages supplied should|
|Method||_composeActiveSourcePubsCondition||Compose ORM condition for restricting relevant source pubs.|
This process should be run after the publisher has published new stuff into the distribution but before the publisher creates the file lists for apt-ftparchive.
The latest publication for any version in
active. Any older publications (including older publications for
live versions with multiple publications) are marked as superseded by
the respective oldest live releases that are newer than the superseded
Any versions that are newer than anything in
marked as deleted. This should not be possible in Soyuz-native
archives, but it can happen during archive imports when the
previous latest version of a package has disappeared from the Sources
list we import.
|Parameters||sorted_pubs||A list of publications for the same package,
in the same archive, series, and pocket, all with status
|live_versions||Iterable of versions that are still considered
"live" for this package. For any of these, the latest publication
|Returns||A tuple of |
The publications are sorted from most current to least current,
as required by
|Parameters||publications||An iterable of |
|Returns||A dict mapping each package name to a sorted list of
publications from |
If the status is DELETED we set the date to UTC_NOW, otherwise it gets the configured stay of execution period.
Currently this is done by assuming that any superseded binary package should be removed. In the future this should attempt to supersede binaries in build-sized chunks only, bug 55030.
Superseded source packages are considered removable when they have no binaries in this distroseries which are published or superseded
When a package is considered for death row it is given a 'scheduled deletion date' of now plus the defined 'stay of execution' time provided in the configuration parameter.
This is only for traditional domination, where the latest published publication is always kept published. It will ignore publications that have no other publications competing for the same binary package.
Dominates binaries, restricted to
This is only for traditional domination, where the latest published
publication is always kept published. See
for this logic.
To optimize for that logic,
findSourcesForDomination will ignore
publications that have no other publications competing for the same
binary package. There'd be nothing to do for those cases.
Dominates sources, restricted to
Returns an iterable of tuples: (name of source package, number of publications in Published state).
Active publications for the "live" versions will remain active. All other active publications for the same package (and the same archive, distroseries, and pocket) are marked superseded.
Unlike traditional domination, this allows multiple versions of a package to stay active in the same distroseries, archive, and pocket.
|package_name||Source package name, as text.|
|live_versions||Iterable of all version strings that are to remain active.|