mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 08:56:13 +01:00
Merge branch 'master' of https://github.com/jengelh/osc
This commit is contained in:
commit
5d0656e167
10
osc/build.py
10
osc/build.py
@ -112,7 +112,7 @@ class Buildinfo:
|
|||||||
# are we building .rpm or .deb?
|
# are we building .rpm or .deb?
|
||||||
# XXX: shouldn't we deliver the type via the buildinfo?
|
# XXX: shouldn't we deliver the type via the buildinfo?
|
||||||
self.pacsuffix = 'rpm'
|
self.pacsuffix = 'rpm'
|
||||||
if self.buildtype == 'dsc':
|
if self.buildtype == 'dsc' or self.buildtype == 'collax':
|
||||||
self.pacsuffix = 'deb'
|
self.pacsuffix = 'deb'
|
||||||
if self.buildtype == 'arch':
|
if self.buildtype == 'arch':
|
||||||
self.pacsuffix = 'arch'
|
self.pacsuffix = 'arch'
|
||||||
@ -271,7 +271,7 @@ def get_built_files(pacdir, buildtype):
|
|||||||
'-type', 'f'],
|
'-type', 'f'],
|
||||||
stdout=subprocess.PIPE).stdout.read().strip()
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
s_built = ''
|
s_built = ''
|
||||||
elif buildtype == 'dsc':
|
elif buildtype == 'dsc' or buildtype == 'collax':
|
||||||
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'DEBS'),
|
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'DEBS'),
|
||||||
'-name', '*.deb'],
|
'-name', '*.deb'],
|
||||||
stdout=subprocess.PIPE).stdout.read().strip()
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
@ -326,7 +326,7 @@ def get_prefer_pkgs(dirs, wanted_arch, type, cpio):
|
|||||||
repositories = []
|
repositories = []
|
||||||
|
|
||||||
suffix = '*.rpm'
|
suffix = '*.rpm'
|
||||||
if type == 'dsc' 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.xz'
|
||||||
@ -424,7 +424,9 @@ def main(apiurl, opts, argv):
|
|||||||
build_type = os.path.splitext(build_descr)[1][1:]
|
build_type = os.path.splitext(build_descr)[1][1:]
|
||||||
if os.path.basename(build_descr) == 'PKGBUILD':
|
if os.path.basename(build_descr) == 'PKGBUILD':
|
||||||
build_type = 'arch'
|
build_type = 'arch'
|
||||||
if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'livebuild']:
|
if os.path.basename(build_descr) == 'build.collax':
|
||||||
|
build_type = 'collax'
|
||||||
|
if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 'livebuild']:
|
||||||
raise oscerr.WrongArgs(
|
raise oscerr.WrongArgs(
|
||||||
'Unknown build type: \'%s\'. Build description should end in .spec, .dsc, .kiwi or .livebuild.' \
|
'Unknown build type: \'%s\'. Build description should end in .spec, .dsc, .kiwi or .livebuild.' \
|
||||||
% build_type)
|
% build_type)
|
||||||
|
@ -5539,7 +5539,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
for subarch in osc.build.can_also_build.get(mainarch):
|
for subarch in osc.build.can_also_build.get(mainarch):
|
||||||
all_archs.append(subarch)
|
all_archs.append(subarch)
|
||||||
for arg in args:
|
for arg in args:
|
||||||
if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi') or arg.endswith('.livebuild') or arg == 'PKGBUILD':
|
if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi') or arg.endswith('.livebuild') or arg == 'PKGBUILD' or arg == 'build.collax':
|
||||||
arg_descr = arg
|
arg_descr = arg
|
||||||
else:
|
else:
|
||||||
if (arg == osc.build.hostarch or arg in all_archs) and arg_arch is None:
|
if (arg == osc.build.hostarch or arg in all_archs) and arg_arch is None:
|
||||||
@ -5597,7 +5597,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
# can be implemented using
|
# can be implemented using
|
||||||
# reduce(lambda x, y: x + y, (glob.glob(x) for x in ('*.spec', '*.dsc', '*.kiwi')))
|
# reduce(lambda x, y: x + y, (glob.glob(x) for x in ('*.spec', '*.dsc', '*.kiwi')))
|
||||||
# but be a bit more readable :)
|
# but be a bit more readable :)
|
||||||
descr = glob.glob('*.spec') + glob.glob('*.dsc') + glob.glob('*.kiwi') + glob.glob('*.livebuild') + glob.glob('PKGBUILD')
|
descr = glob.glob('*.spec') + glob.glob('*.dsc') + glob.glob('*.kiwi') + glob.glob('*.livebuild') + glob.glob('PKGBUILD') + glob.glob('build.collax')
|
||||||
|
|
||||||
# FIXME:
|
# FIXME:
|
||||||
# * request repos from server and select by build type.
|
# * request repos from server and select by build type.
|
||||||
|
Loading…
Reference in New Issue
Block a user