739
739
distribution 'main_archive'.
742
def updateCompletePackageCache(archive, log, ztm, commit_chunk=500):
743
"""Update the binary package cache
745
Consider all binary package names published in this distro series
746
and entirely skips updates for disabled archives
748
:param archive: target `IArchive`;
749
:param log: logger object for printing debug level information;
750
:param ztm: transaction used for partial commits, every chunk of
751
'commit_chunk' updates is committed;
752
:param commit_chunk: number of updates before commit, defaults to 500.
754
:return the number of packages updated.
757
def updatePackageCache(binarypackagename, archive, log):
758
"""Update the package cache for a given IBinaryPackageName
760
'log' is required, it should be a logger object able to print
761
DEBUG level messages.
762
'ztm' is the current trasaction manager used for partial commits
763
(in full batches of 100 elements)
766
742
def searchPackages(text):
767
743
"""Search through the packge cache for this distroseries and return
768
744
DistroSeriesBinaryPackage objects that match the given text.