From b876429cefacf46bea6139144f2450db20f7a127 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Thu, 17 Jul 2014 14:04:07 +0200 Subject: [PATCH] [backend] support service generated PKGBUILD files --- src/backend/bs_sched | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/backend/bs_sched b/src/backend/bs_sched index 6c4880cc87a..a94673fb7db 100755 --- a/src/backend/bs_sched +++ b/src/backend/bs_sched @@ -8505,20 +8505,15 @@ NEXTPRP: } elsif ($pdata->{'channel'}) { $packtype = 'channel'; } elsif ($info && $info->{'file'}) { - if ($info->{'file'} eq 'PKGBUILD') { + if ($info->{'file'} =~ /\.(spec|dsc|kiwi|livebuild)$/) { + $packtype = $1; + } elsif ($info->{'file'} =~ /PKGBUILD$/) { $packtype = 'arch'; - } elsif ($info->{'file'} eq '_preinstallimage') { + } elsif ($info->{'file'} =~ /_preinstallimage$/) { $packtype = 'preinstallimage'; - } elsif ($info->{'file'} =~ /\.(spec|dsc|kiwi|livebuild)$/) { - $packtype = $1; - if ($packtype eq 'kiwi') { - # check if it is kiwi-product - if ($info->{'imagetype'} && $info->{'imagetype'}->[0] eq 'product') { - $packtype = 'kiwi-product'; - } else { - $packtype = 'kiwi-image'; - } - } + } + if ($packtype eq 'kiwi') { + $packtype = $info->{'imagetype'} && $info->{'imagetype'}->[0] eq 'product' ? 'kiwi-product' : 'kiwi-image'; } } $pkg2packtype{$packid} = $packtype;