From d6184c6bcf47ece508417a16c2781965a1b95eaa Mon Sep 17 00:00:00 2001 From: Tohka Date: Tue, 23 Jun 2020 15:35:00 +0300 Subject: [PATCH] layout: Update for new Ubuntu kernel page layout --- pkgcollector/PackageCollector.py | 8 ++++---- pkgcollector/PackageList.py | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgcollector/PackageCollector.py b/pkgcollector/PackageCollector.py index 4cfa9f2..45e3fe8 100644 --- a/pkgcollector/PackageCollector.py +++ b/pkgcollector/PackageCollector.py @@ -153,10 +153,10 @@ def getFiles(self, releaseLink, releaseType): # If we've reached MainlineBuilds, then we're done with all architectures. # If we have a chosen architecture and the file is a .deb package, then it has to be in # our list of architectures and it must not be an lpae-based build (we don't package those) - if text.startswith('BUILD.LOG.'): - arch = text[len('BUILD.LOG.'):] + if text.endswith('/log'): + arch = text[:text.find('/log')] continue - elif text.endswith('MainlineBuilds'): + elif text == 'Name': break elif not text.endswith('.deb') or not arch: continue @@ -346,4 +346,4 @@ def updateCache(self): def publishRepository(self): # If temporary directory doesn't exist, nothing matters - self.pkgList.saveAllDistributions('l') + self.pkgList.saveAllDistributions(['l', 'custom']) diff --git a/pkgcollector/PackageList.py b/pkgcollector/PackageList.py index b8d6fc6..f429612 100644 --- a/pkgcollector/PackageList.py +++ b/pkgcollector/PackageList.py @@ -63,10 +63,13 @@ def addDebToPool(self, filename): shutil.move(filename, poolFilename) - def saveAllDistributions(self, letter): + def saveAllDistributions(self, letters): # Save all distributions self.log('Saving package list...') - releases = self.getAllReleasesInPool(letter) + releases = [] + + for letter in letters: + releases.extend(self.getAllReleasesInPool(letter)) for distribution in self.distributions.values(): distribution.save(releases)