def updatePackageCache(self):
     # Create package cache records for new binary packages.
     #
     # SoyuzTestPublisher.updatePackageCache() creates a
     # DistroSeriesPackageCache record for the new binary package.
     # The method closes the current DB connection, making references
     # to DB objects in other DB objects unusable. Starting with
     # the distroarchseries, we can create new, valid, instances of
     # objects required later in the test again.
     # of the objects we need later.
     sourcepackagename = self.sourcepackagerelease.sourcepackagename
     publisher = SoyuzTestPublisher()
     publisher.updatePackageCache(self.distroarchseries.distroseries)
     self.distroarchseries = DistroArchSeries.get(self.distroarchseries.id)
     distribution = self.distroarchseries.distroseries.distribution
     releases = distribution.getCurrentSourceReleases([sourcepackagename])
     [(distribution_sourcepackage, dsp_release)] = releases.items()
     self.dsp_release = dsp_release
     self.sourcepackagerelease = dsp_release.sourcepackagerelease
 def updateDistroSeriesPackageCache(self):
     # Create DistroSeriesPackageCache records for new binary
     # packages.
     #
     # SoyuzTestPublisher.updateDistroSeriesPackageCache() creates
     # a DistroSeriesPackageCache record for the new binary package.
     # The method closes the current DB connection, making references
     # to DB objects in other DB objects unusable. Starting with
     # the distroarchseries, we can create new, valid, instances of
     # objects required later in the test again.
     # of the objects we need later.
     sourcepackagename = self.sourcepackagerelease.sourcepackagename
     publisher = SoyuzTestPublisher()
     publisher.updateDistroSeriesPackageCache(
         self.distroarchseries.distroseries)
     self.distroarchseries = DistroArchSeries.get(self.distroarchseries.id)
     distribution = self.distroarchseries.distroseries.distribution
     releases = distribution.getCurrentSourceReleases([sourcepackagename])
     [(distribution_sourcepackage, dsp_release)] = releases.items()
     self.dsp_release = dsp_release
     self.sourcepackagerelease = dsp_release.sourcepackagerelease