Part of lp.archivepublisher.publishing View In Hierarchy
Method | __init__ | Initialize a publisher. |
Method | setupArchiveDirs | Undocumented |
Method | isDirty | True if a publication has happened in this release and pocket. |
Method | markPocketDirty | Mark a pocket dirty only if it's allowed. |
Method | isAllowed | Whether or not the given suite should be considered. |
Method | subcomponents | Undocumented |
Method | consider_series | Undocumented |
Method | checkLegalPocket | Check if the publication can happen in the archive. |
Method | getPendingSourcePublications | Return the specific group of source records to be published. |
Method | publishSources | Publish sources for a given distroseries and pocket. |
Method | findAndPublishSources | Search for and publish all pending sources. |
Method | getPendingBinaryPublications | Return the specific group of binary records to be published. |
Method | publishBinaries | Publish binaries for a given distroarchseries and pocket. |
Method | findAndPublishBinaries | Search for and publish all pending binaries. |
Method | A_publish | First step in publishing: actual package publishing. |
Method | A2_markPocketsWithDeletionsDirty | An intermediate step in publishing to detect deleted packages. |
Method | B_dominate | Second step in publishing: domination. |
Method | C_doFTPArchive | Does the ftp-archive step: generates Sources and Packages. |
Method | C_writeIndexes | Write Index files (Packages & Sources) using LP information. |
Method | D_writeReleaseFiles | Write out the Release files for the provided distribution. |
Method | createSeriesAliases | Ensure that any series aliases exist. |
Method | checkDirtySuiteBeforePublishing | Last check before publishing a dirty suite. |
Method | deleteArchive | Delete the archive. |
Method | _allIndexFiles | Return all index files on disk for a distroseries. |
Method | _latestNonEmptySeries | Find the latest non-empty series in an archive. |
Method | _writeComponentIndexes | Write Index files for single distroseries + pocket + component. |
Method | _getLabel | Return the contents of the Release file Label field. |
Method | _getOrigin | Return the contents of the Release file Origin field. |
Method | _updateByHash | Update by-hash files for a suite. |
Method | _writeReleaseFile | Write a Release file to the archive (as Release.new). |
Method | _syncTimestamps | Make sure the timestamps on all files in a suite match. |
Method | _writeSuite | Write out the Release files for the provided suite. |
Method | _writeSuiteArchOrSource | Write out a Release file for an architecture or source. |
Method | _writeSuiteSource | Write out a Release file for a suite's sources. |
Method | _writeSuiteArch | Write out a Release file for an architecture in a suite. |
Method | _writeSuiteI18n | Write out an Index file for translation files in a suite. |
Method | _readIndexFileHashes | Read an index file and return its hashes. |
Publishers need the pool root dir and a DiskPool object.
Optionally we can pass a list of tuples, (distroseries.name, pocket), which will restrict the publisher actions, only suites listed in allowed_suites will be modified.
Return True either if the self.allowed_suite is empty (was not specified in command line) or if the given suite is included in it.
Otherwise, return False.
Consider records returned by getPendingSourcePublications.
Parameters | is_careful | If True, republish all published records (system will DTRT checking the hash of all published files). |
Consider records returned by getPendingBinaryPublications.
Parameters | is_careful | If True, republish all published records (system will DTRT checking the hash of all published files). |
Publish each DistroSeries, which causes publishing records to be updated, and files to be placed on disk where necessary. If self.allowed_suites is set, restrict the publication procedure to them.
Mark pockets containing deleted packages (status DELETED or OBSOLETE), scheduledeletiondate NULL and dateremoved NULL as dirty, to ensure that they are processed in death row.
Iterates over all distroseries and its pockets and components.
If is_careful is specified, we include all pockets of all releases.
Otherwise we include only pockets flagged as true in dirty_pockets.
For each index file, this yields a tuple of (function to open file in uncompressed form, path to file).
Doing this properly (series with highest version and any active publications) is expensive. However, we just went to the effort of publishing everything; so a quick-and-dirty approach is to look through what we published on disk.
The natural implementation would be to point the alias at self.distro.currentseries, but that works poorly for PPAs, where it's possible that no packages have been published for the current series. We also don't want to have to go through and republish all PPAs when we create a new series. Thus, we instead do the best we can by pointing the alias at the latest series with any publications in the archive, which is the best approximation to a development series for that PPA.
This does mean that the published alias might point to an older series, then you upload something to the alias and find that the alias has now moved to a newer series. What can I say? The requirements are not entirely coherent for PPAs given that packages are not automatically copied forward.
Iterates over all supported architectures and 'sources', no support for installer-* yet. Write contents using LP info to an extra plain file (Packages.lp and Sources.lp .
If the distroseries is stable and the archive doesn't allow updates in RELEASE pocket (primary archives) we certainly have a problem, better stop.
Returns | a text that should be used as the value of the Release file 'Label' field. |
Primary, Partner and Copy archives use the distribution displayname.
For PPAs we use a more specific value that follows
get_ppa_reference
.
Returns | a text that should be used as the value of the Release file 'Origin' field. |
This takes Release file data which references a set of on-disk files, injects any newly-modified files from that set into the librarian and the ArchiveFile table, and updates the on-disk by-hash directories to be in sync with ArchiveFile. Any on-disk by-hash entries that ceased to be current sufficiently long ago are removed.
Parameters | suite | The name of the suite whose Release file is to be written. |
release_data | A debian.deb822.Release object to write
to the filesystem. |
Parameters | suite | Suite name. |
file_name | Filename relative to the parent container directory. | |
subpath | Optional subpath within the suite root. Generated indexes will not include this path. If omitted, filenames are assumed to be relative to the suite root. | |
real_file_name | The actual filename to open when reading
data (file_name will still be the name used in the returned
dictionary). If this is passed, then the returned hash
component dictionaries will include it in additional "real_name"
items. | |
Returns | A dictionary mapping hash field names to dictionaries of their components as defined by debian.deb822.Release (e.g. {"md5sum": {"md5sum": ..., "size": ..., "name": ...}}), or None if the file could not be found. |