diff --git a/obs-service-format_spec_file.changes b/obs-service-format_spec_file.changes index c1fe3b7..3ad932c 100644 --- a/obs-service-format_spec_file.changes +++ b/obs-service-format_spec_file.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 9 10:36:01 UTC 2012 - coolo@suse.com + +- fix the whitespace after the preamble + ------------------------------------------------------------------- Mon Feb 6 12:33:12 UTC 2012 - coolo@suse.com diff --git a/prepare_spec b/prepare_spec index b100e5a..2c4756a 100644 --- a/prepare_spec +++ b/prepare_spec @@ -674,12 +674,14 @@ print "# needsrootforbuild\n" if $needsrootforbuild; print "# needsbinariesforbuild\n" if $needsbinariesforbuild; print "# nodebuginfo\n" if $nodebuginfo; print "# icecream $icecreamforbuild\n" if $icecreamforbuild ne ''; -print "\n" if ($needsrootforbuild || $needsbinariesforbuild || $nodebuginfo || $icecreamforbuild ne ''); +#print "\n" if ($needsrootforbuild || $needsbinariesforbuild || $nodebuginfo || $icecreamforbuild ne ''); -while ($oldspec[0] eq "XXXBLANKLINE") { +while ($oldspec[0] eq "XXXBLANKLINE" || $oldspec[0] eq "XXXDOUBLELINE") { shift @oldspec; } +print "\n\n"; + my $license_unique = !grep { $_ ne $main_license } values %seen_licenses; my $groups_unique = !grep { $_ ne $main_group } values %seen_groups; # we need to have unique groups in the spec file as long as we support SLE11 ;( @@ -689,6 +691,7 @@ my $first_summary = 1; my $line; while (@oldspec) { $line = shift @oldspec; + if ($line eq "XXXBLANKLINE") { print "\n" unless $oldspec[0] && ($oldspec[0] =~ m/^XXX.*LINE/ || $oldspec[0] =~ /^\s*$/ || $oldspec[0] =~ /^\n/); } elsif ($line eq "XXXDOUBLELINE") {