From 194f829297bf8bb6ac1db35b6f4c0e57c96dac0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 7 Jul 2022 12:30:55 +0200 Subject: [PATCH] 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 --- osc/build.py | 2 +- osc/fetch.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osc/build.py b/osc/build.py index 27403b5f..993987c3 100644 --- a/osc/build.py +++ b/osc/build.py @@ -293,7 +293,7 @@ class Pac: 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.urllist = [url % self.mp for url in urllist] diff --git a/osc/fetch.py b/osc/fetch.py index dc521ca5..839023d0 100644 --- a/osc/fetch.py +++ b/osc/fetch.py @@ -265,8 +265,8 @@ class Fetcher: if not hdrmd5 or hdrmd5 != i.hdrmd5: print('%s/%s: attempting download from api, since the hdrmd5 did not match - %s != %s' % (i.project, i.name, hdrmd5, i.hdrmd5)) - os.unlink(i.fullfilename) - self.__add_cpio(i) + os.unlink(i.fullfilename) + self.__add_cpio(i) except KeyboardInterrupt: print('Cancelled by user (ctrl-c)')