1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-24 17:16:12 +01:00
This commit is contained in:
Marcus Huewe 2015-09-14 10:48:11 +02:00
commit 5d0656e167
2 changed files with 8 additions and 6 deletions

View File

@ -112,7 +112,7 @@ class Buildinfo:
# are we building .rpm or .deb?
# XXX: shouldn't we deliver the type via the buildinfo?
self.pacsuffix = 'rpm'
if self.buildtype == 'dsc':
if self.buildtype == 'dsc' or self.buildtype == 'collax':
self.pacsuffix = 'deb'
if self.buildtype == 'arch':
self.pacsuffix = 'arch'
@ -271,7 +271,7 @@ def get_built_files(pacdir, buildtype):
'-type', 'f'],
stdout=subprocess.PIPE).stdout.read().strip()
s_built = ''
elif buildtype == 'dsc':
elif buildtype == 'dsc' or buildtype == 'collax':
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'DEBS'),
'-name', '*.deb'],
stdout=subprocess.PIPE).stdout.read().strip()
@ -326,7 +326,7 @@ def get_prefer_pkgs(dirs, wanted_arch, type, cpio):
repositories = []
suffix = '*.rpm'
if type == 'dsc' or type == 'livebuild':
if type == 'dsc' or type == 'collax' or type == 'livebuild':
suffix = '*.deb'
elif type == 'arch':
suffix = '*.pkg.tar.xz'
@ -424,7 +424,9 @@ def main(apiurl, opts, argv):
build_type = os.path.splitext(build_descr)[1][1:]
if os.path.basename(build_descr) == 'PKGBUILD':
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(
'Unknown build type: \'%s\'. Build description should end in .spec, .dsc, .kiwi or .livebuild.' \
% build_type)

View File

@ -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):
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':
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
else:
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
# 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')
descr = glob.glob('*.spec') + glob.glob('*.dsc') + glob.glob('*.kiwi') + glob.glob('*.livebuild') + glob.glob('PKGBUILD') + glob.glob('build.collax')
# FIXME:
# * request repos from server and select by build type.