1
0

do not break require lines using %() macros, eg. upcomming kiwi.spec

OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-format_spec_file?expand=0&rev=87
This commit is contained in:
Adrian Schröter 2012-05-29 09:51:48 +00:00 committed by Git OBS Bridge
parent 2293dc1d88
commit 0eeb1ee7bb
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 29 09:51:33 UTC 2012 - adrian@suse.de
- do not break require lines using %() macros
-------------------------------------------------------------------
Fri May 11 09:17:10 UTC 2012 - coolo@suse.com

View File

@ -320,9 +320,15 @@ sub read_and_parse_old_spec {
}
my %aa;
if ($cur_tag =~ /%\(/) {
# do not touch lines with shell execution
$aa{$cur_tag}=1;
} else {
# seperate tags of all other lines
while ($cur_tag =~ m{([^,\s]+(\s*[<=>]+\s*(?:\%\(.*\)|[^,\s]+))?)}g) {
$aa{$1}=1;
}
}
# ignore line if it looks like a "usedforbuild" line, i.e.
# if it contains too many base packages
next if (grep {$aa{$_}} qw{gcc rpm glibc bash}) > 2;