1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 06:46:13 +01:00

fix product build rpm caching

* src/noarch rpm packaages needs to be stored in scheduler architecture to avoid
  conflicts of the multiple versions
* avoid removal of every downloaded file
This commit is contained in:
Adrian Schröter 2022-07-07 12:30:55 +02:00
parent 515db3dea0
commit 194f829297
No known key found for this signature in database
GPG Key ID: 918D8C954C08DB67
2 changed files with 3 additions and 3 deletions

View File

@ -293,7 +293,7 @@ class Pac:
def makeurls(self, cachedir, urllist): def makeurls(self, cachedir, urllist):
self.localdir = '%s/%s/%s/%s' % (cachedir, self.project, self.repository, self.arch) self.localdir = '%s/%s/%s/%s' % (cachedir, self.project, self.repository, self.repoarch)
self.fullfilename = os.path.join(self.localdir, self.canonname) self.fullfilename = os.path.join(self.localdir, self.canonname)
self.urllist = [url % self.mp for url in urllist] self.urllist = [url % self.mp for url in urllist]

View File

@ -265,8 +265,8 @@ class Fetcher:
if not hdrmd5 or hdrmd5 != i.hdrmd5: if not hdrmd5 or hdrmd5 != i.hdrmd5:
print('%s/%s: attempting download from api, since the hdrmd5 did not match - %s != %s' print('%s/%s: attempting download from api, since the hdrmd5 did not match - %s != %s'
% (i.project, i.name, hdrmd5, i.hdrmd5)) % (i.project, i.name, hdrmd5, i.hdrmd5))
os.unlink(i.fullfilename) os.unlink(i.fullfilename)
self.__add_cpio(i) self.__add_cpio(i)
except KeyboardInterrupt: except KeyboardInterrupt:
print('Cancelled by user (ctrl-c)') print('Cancelled by user (ctrl-c)')