From 510ce65ab2d8d82086c3275a4f6a75de452c2753378e427e90bb846697b49d53 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Thu, 31 Jul 2014 13:47:43 +0000 Subject: [PATCH] - update prepare_spec from git to fix (bnc#889537) OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-format_spec_file?expand=0&rev=140 --- obs-service-format_spec_file.changes | 5 +++++ prepare_spec | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/obs-service-format_spec_file.changes b/obs-service-format_spec_file.changes index e3dc069..1141da6 100644 --- a/obs-service-format_spec_file.changes +++ b/obs-service-format_spec_file.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 31 15:44:36 CEST 2014 - ro@suse.de + +- update prepare_spec from git to fix (bnc#889537) + ------------------------------------------------------------------- Thu Jul 10 10:49:45 UTC 2014 - coolo@suse.com diff --git a/prepare_spec b/prepare_spec index 3e4f813..cba0794 100644 --- a/prepare_spec +++ b/prepare_spec @@ -267,7 +267,7 @@ sub read_and_parse_old_spec { next; } - if ( /^# vim:/ ) { + if ( /^# vim:/ && $current_section eq "header" ) { $vim_modeline = $_; next; } @@ -320,7 +320,7 @@ sub read_and_parse_old_spec { } my %aa; - if ($cur_tag =~ /%\(/) { + if ($cur_tag =~ /%\(/ || $cur_tag =~ /%\{/) { # do not touch lines with shell execution $aa{$cur_tag}=1; } else { @@ -724,6 +724,6 @@ while (@oldspec) { } } -print "\n" unless $line eq "XXXBLANKLINE"; +print "\n" unless $line eq "XXXBLANKLINE" || $line eq ""; print "%changelog\n";