forked from pool/obs-service-format_spec_file
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:
parent
2293dc1d88
commit
0eeb1ee7bb
@ -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
|
Fri May 11 09:17:10 UTC 2012 - coolo@suse.com
|
||||||
|
|
||||||
|
10
prepare_spec
10
prepare_spec
@ -320,8 +320,14 @@ sub read_and_parse_old_spec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my %aa;
|
my %aa;
|
||||||
while ($cur_tag =~ m{([^,\s]+(\s*[<=>]+\s*(?:\%\(.*\)|[^,\s]+))?)}g) {
|
if ($cur_tag =~ /%\(/) {
|
||||||
$aa{$1}=1;
|
# 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.
|
# ignore line if it looks like a "usedforbuild" line, i.e.
|
||||||
# if it contains too many base packages
|
# if it contains too many base packages
|
||||||
|
Loading…
Reference in New Issue
Block a user