mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-28 02:36:15 +01:00
Merge branch 'master' of https://github.com/mlschroe/osc into master
Initial support for flatpak. Note that this requires a recent obs-build version.
This commit is contained in:
commit
558efce0fd
@ -389,6 +389,11 @@ def get_built_files(pacdir, buildtype):
|
||||
'-type', 'f'],
|
||||
stdout=subprocess.PIPE).stdout.read().strip()
|
||||
s_built = ''
|
||||
elif buildtype == 'flatpak':
|
||||
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'OTHER'),
|
||||
'-type', 'f'],
|
||||
stdout=subprocess.PIPE).stdout.read().strip()
|
||||
s_built = ''
|
||||
else:
|
||||
print('WARNING: Unknown package type \'%s\'.' % buildtype, file=sys.stderr)
|
||||
b_built = ''
|
||||
@ -587,7 +592,9 @@ def main(apiurl, opts, argv):
|
||||
build_type = 'docker'
|
||||
if os.path.basename(build_descr) == 'fissile.yml':
|
||||
build_type = 'fissile'
|
||||
if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 'livebuild', 'simpleimage', 'snapcraft', 'appimage', 'docker', 'podman', 'fissile']:
|
||||
if build_descr.endswith('flatpak.yaml') or build_descr.endswith('flatpak.yml') or build_descr.endswith('flatpak.json'):
|
||||
build_type = 'flatpak'
|
||||
if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 'livebuild', 'simpleimage', 'snapcraft', 'appimage', 'docker', 'podman', 'fissile', 'flatpak']:
|
||||
raise oscerr.WrongArgs(
|
||||
'Unknown build type: \'%s\'. Build description should end in .spec, .dsc, .kiwi, or .livebuild. Or being named PKGBUILD, build.collax, simpleimage, appimage.yml, snapcraft.yaml or Dockerfile' \
|
||||
% build_type)
|
||||
|
@ -6245,7 +6245,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
for subarch in osc.build.can_also_build.get(mainarch):
|
||||
all_archs.append(subarch)
|
||||
for arg in args:
|
||||
if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi') or arg.endswith('.livebuild') or arg == 'PKGBUILD' or arg == 'build.collax' or arg == 'Dockerfile' or arg == 'fissile.yml' or arg == 'appimage.yml':
|
||||
if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi') or arg.endswith('.livebuild') or arg == 'PKGBUILD' or arg == 'build.collax' or arg == 'Dockerfile' or arg == 'fissile.yml' or arg == 'appimage.yml' or arg.endswith('flatpak.yaml') or arg.endswith('flatpak.yml') or arg.endswith('flatpak.json'):
|
||||
arg_descr = arg
|
||||
else:
|
||||
if (arg == osc.build.hostarch or arg in all_archs) and arg_arch is None:
|
||||
@ -6309,7 +6309,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
# but be a bit more readable :)
|
||||
descr = glob.glob('*.spec') + glob.glob('*.dsc') + glob.glob('*.kiwi') + glob.glob('*.livebuild') \
|
||||
+ glob.glob('PKGBUILD') + glob.glob('build.collax') + glob.glob('Dockerfile') + glob.glob('fissile.yml') \
|
||||
+ glob.glob('appimage.yml')
|
||||
+ glob.glob('appimage.yml') \
|
||||
+ glob.glob('*flatpak.yaml') + glob.glob('*flatpak.yml') + glob.glob('*flatpak.json')
|
||||
|
||||
# FIXME:
|
||||
# * request repos from server and select by build type.
|
||||
|
Loading…
Reference in New Issue
Block a user