mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-09 20:45:47 +01:00
Merge pull request #718 from adrianschroeter/arch_zst
- support zstd arch linux files in local build
This commit is contained in:
commit
3d2f1a4ffb
@ -424,7 +424,7 @@ def get_prefer_pkgs(dirs, wanted_arch, type, cpio):
|
|||||||
if type == 'dsc' or type == 'collax' or type == 'livebuild':
|
if type == 'dsc' or type == 'collax' or type == 'livebuild':
|
||||||
suffix = '*.deb'
|
suffix = '*.deb'
|
||||||
elif type == 'arch':
|
elif type == 'arch':
|
||||||
suffix = '*.pkg.tar.xz'
|
suffix = '*.pkg.tar.*'
|
||||||
|
|
||||||
for dir in dirs:
|
for dir in dirs:
|
||||||
# check for repodata
|
# check for repodata
|
||||||
|
@ -82,9 +82,9 @@ class Fetcher:
|
|||||||
raise oscerr.APIError('CPIO archive is incomplete '
|
raise oscerr.APIError('CPIO archive is incomplete '
|
||||||
'(see .errors file)')
|
'(see .errors file)')
|
||||||
if package == '_repository':
|
if package == '_repository':
|
||||||
n = re.sub(b'\.pkg\.tar\..z$', b'.arch', hdr.filename)
|
n = re.sub(b'\.pkg\.tar\.(zst|.z)$', b'.arch', hdr.filename)
|
||||||
if n.startswith(b'container:'):
|
if n.startswith(b'container:'):
|
||||||
n = re.sub(b'\.tar\..z$', b'.tar', hdr.filename)
|
n = re.sub(b'\.tar\.(zst|.z)$', b'.tar', hdr.filename)
|
||||||
pac = pkgs[decode_it(n.rsplit(b'.', 1)[0])]
|
pac = pkgs[decode_it(n.rsplit(b'.', 1)[0])]
|
||||||
pac.canonname = hdr.filename
|
pac.canonname = hdr.filename
|
||||||
else:
|
else:
|
||||||
|
@ -72,7 +72,8 @@ class PackageQuery:
|
|||||||
elif magic[:5] == b'<?xml':
|
elif magic[:5] == b'<?xml':
|
||||||
f.close()
|
f.close()
|
||||||
return None
|
return None
|
||||||
elif magic[:5] == b'\375\067zXZ' or magic[:2] == b'\037\213':
|
# arch tar ball compressed with gz, xz or zst
|
||||||
|
elif magic[:5] == b'\375\067zXZ' or magic[:2] == b'\037\213' or magic[:5] == b'(\xb5/\xfd\x2f':
|
||||||
from . import archquery
|
from . import archquery
|
||||||
pkgquery = archquery.ArchQuery(f)
|
pkgquery = archquery.ArchQuery(f)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user