mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 06:46:13 +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':
|
||||
suffix = '*.deb'
|
||||
elif type == 'arch':
|
||||
suffix = '*.pkg.tar.xz'
|
||||
suffix = '*.pkg.tar.*'
|
||||
|
||||
for dir in dirs:
|
||||
# check for repodata
|
||||
|
@ -82,9 +82,9 @@ class Fetcher:
|
||||
raise oscerr.APIError('CPIO archive is incomplete '
|
||||
'(see .errors file)')
|
||||
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:'):
|
||||
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.canonname = hdr.filename
|
||||
else:
|
||||
|
@ -72,7 +72,8 @@ class PackageQuery:
|
||||
elif magic[:5] == b'<?xml':
|
||||
f.close()
|
||||
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
|
||||
pkgquery = archquery.ArchQuery(f)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user