491
491
:return: list of `IDistroSeries`
494
def getSourcePackageCaches(archive=None):
495
"""The set of all source package info caches for this distribution.
497
If 'archive' is not given it will return all caches stored for the
498
distribution main archives (PRIMARY and PARTNER).
501
def removeOldCacheItems(archive, log):
502
"""Delete any cache records for removed packages.
504
Also purges all existing cache records for disabled archives.
506
:param archive: target `IArchive`.
507
:param log: the context logger object able to print DEBUG level
511
def updateCompleteSourcePackageCache(archive, log, ztm, commit_chunk=500):
512
"""Update the source package cache.
514
Consider every non-REMOVED sourcepackage and entirely skips updates
515
for disabled archives.
517
:param archive: target `IArchive`;
518
:param log: logger object for printing debug level information;
519
:param ztm: transaction used for partial commits, every chunk of
520
'commit_chunk' updates is committed;
521
:param commit_chunk: number of updates before commit, defaults to 500.
523
:return the number packages updated done
526
def updateSourcePackageCache(sourcepackagename, archive, log):
527
"""Update cached source package details.
529
Update cache details for a given ISourcePackageName, including
530
generated binarypackage names, summary and description fti.
531
'log' is required and only prints debug level information.
534
494
@rename_parameters_as(text="source_match")
535
495
@operation_parameters(
536
496
text=TextLine(title=_("Source package name substring match"),
578
538
(a substring of) their binary package names.
581
def getFileByName(filename, archive=None, source=True, binary=True):
582
"""Find and return a LibraryFileAlias for the filename supplied.
584
The file returned will be one of those published in the distribution.
586
If searching both source and binary, and the file is found in the
587
binary packages it'll return that over a file for a source package.
589
If 'archive' is not passed the distribution.main_archive is assumed.
591
At least one of source and binary must be true.
593
Raises NotFoundError if it fails to find the named file.
596
541
def guessPublishedSourcePackageName(pkgname):
597
542
"""Return the "published" SourcePackageName related to pkgname.