mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 14:56:14 +01:00
Support 'fissile' build type
This commit is contained in:
parent
49e8d10594
commit
e6d492ee38
19
osc/build.py
19
osc/build.py
@ -520,7 +520,9 @@ def main(apiurl, opts, argv):
|
||||
build_type = 'snapcraft'
|
||||
if os.path.basename(build_descr) == 'Dockerfile':
|
||||
build_type = 'docker'
|
||||
if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 'livebuild', 'snapcraft', 'appimage', 'docker']:
|
||||
if os.path.basename(build_descr) == 'fissile.yml':
|
||||
build_type = 'fissile'
|
||||
if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 'livebuild', 'snapcraft', 'appimage', 'docker', 'fissile']:
|
||||
raise oscerr.WrongArgs(
|
||||
'Unknown build type: \'%s\'. Build description should end in .spec, .dsc, .kiwi, or .livebuild. Or being named PKGBUILD, build.collax, appimage.yml, snapcraft.yaml or Dockerfile' \
|
||||
% build_type)
|
||||
@ -961,8 +963,8 @@ def main(apiurl, opts, argv):
|
||||
if old_pkg_dir != None:
|
||||
buildargs.append('--oldpackages=%s' % old_pkg_dir)
|
||||
|
||||
# Make packages from buildinfo available as repos for kiwi/docker
|
||||
if build_type == 'kiwi' or build_type == 'docker':
|
||||
# Make packages from buildinfo available as repos for kiwi/docker/fissile
|
||||
if build_type == 'kiwi' or build_type == 'docker' or build_type == 'fissile':
|
||||
if os.path.exists('repos'):
|
||||
shutil.rmtree('repos')
|
||||
if os.path.exists('containers'):
|
||||
@ -1105,7 +1107,7 @@ def main(apiurl, opts, argv):
|
||||
|
||||
print('Writing build configuration')
|
||||
|
||||
if build_type == 'kiwi' or build_type == 'docker':
|
||||
if build_type == 'kiwi' or build_type == 'docker' or build_type == 'fissile':
|
||||
rpmlist = [ '%s %s\n' % (i.name, i.fullfilename) for i in bi.deps if not i.noinstall ]
|
||||
else:
|
||||
rpmlist = [ '%s %s\n' % (i.name, i.fullfilename) for i in bi.deps ]
|
||||
@ -1121,10 +1123,11 @@ def main(apiurl, opts, argv):
|
||||
rpmlist.append('preinstall: ' + ' '.join(bi.preinstall_list) + '\n')
|
||||
rpmlist.append('vminstall: ' + ' '.join(bi.vminstall_list) + '\n')
|
||||
rpmlist.append('runscripts: ' + ' '.join(bi.runscripts_list) + '\n')
|
||||
if build_type != 'kiwi' and build_type != 'docker' and bi.noinstall_list:
|
||||
rpmlist.append('noinstall: ' + ' '.join(bi.noinstall_list) + '\n')
|
||||
if build_type != 'kiwi' and build_type != 'docker' and bi.installonly_list:
|
||||
rpmlist.append('installonly: ' + ' '.join(bi.installonly_list) + '\n')
|
||||
if build_type != 'kiwi' and build_type != 'docker' and build_type != 'fissile':
|
||||
if bi.noinstall_list:
|
||||
rpmlist.append('noinstall: ' + ' '.join(bi.noinstall_list) + '\n')
|
||||
if bi.installonly_list:
|
||||
rpmlist.append('installonly: ' + ' '.join(bi.installonly_list) + '\n')
|
||||
|
||||
rpmlist_file = NamedTemporaryFile(prefix='rpmlist.')
|
||||
rpmlist_filename = rpmlist_file.name
|
||||
|
@ -5789,7 +5789,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':
|
||||
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.ymp':
|
||||
arg_descr = arg
|
||||
else:
|
||||
if (arg == osc.build.hostarch or arg in all_archs) and arg_arch is None:
|
||||
@ -5851,7 +5851,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
# reduce(lambda x, y: x + y, (glob.glob(x) for x in ('*.spec', '*.dsc', '*.kiwi')))
|
||||
# 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('PKGBUILD') + glob.glob('build.collax') + glob.glob('Dockerfile') + glob.glob('fissile.ymp')
|
||||
|
||||
# FIXME:
|
||||
# * request repos from server and select by build type.
|
||||
|
Loading…
Reference in New Issue
Block a user