mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 10:16:14 +01:00
Container support: use multiple container extensions when checking the cache
The container may end in .tar.xz, .tar.gz, or .tar
This commit is contained in:
parent
c2fc655557
commit
c3e0bbccb2
@ -246,6 +246,13 @@ class Fetcher:
|
|||||||
all = len(buildinfo.deps)
|
all = len(buildinfo.deps)
|
||||||
for i in buildinfo.deps:
|
for i in buildinfo.deps:
|
||||||
i.makeurls(self.cachedir, self.urllist)
|
i.makeurls(self.cachedir, self.urllist)
|
||||||
|
# find container extension by looking in the cache
|
||||||
|
if i.name.startswith('container:') and i.fullfilename.endswith('.tar.xz'):
|
||||||
|
for ext in ['.tar.xz', '.tar.gz', '.tar']:
|
||||||
|
if os.path.exists(i.fullfilename[:-7] + ext):
|
||||||
|
i.canonname = i.canonname[:-7] + ext
|
||||||
|
i.makeurls(self.cachedir, self.urllist)
|
||||||
|
|
||||||
if os.path.exists(i.fullfilename):
|
if os.path.exists(i.fullfilename):
|
||||||
cached += 1
|
cached += 1
|
||||||
if i.hdrmd5:
|
if i.hdrmd5:
|
||||||
|
Loading…
Reference in New Issue
Block a user