Accepting request 75241 from openSUSE:Tools
- fix empty line handling (multiple subsequent empty lines) OBS-URL: https://build.opensuse.org/request/show/75241 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-format_spec_file?expand=0&rev=7
This commit is contained in:
commit
954126720d
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 4 11:42:26 CEST 2011 - ro@suse.de
|
||||
|
||||
- fix empty line handling (multiple subsequent empty lines)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 4 00:16:05 CEST 2011 - ro@suse.de
|
||||
|
||||
|
@ -30,6 +30,7 @@ Requires: osc-source_validator
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
This is a source service for openSUSE Build Service.
|
||||
|
||||
@ -43,17 +44,22 @@ spec file instead of creating a new one.
|
||||
|
||||
%setup -q -D -T 0 -n .
|
||||
|
||||
|
||||
%build
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/obs/service/format_spec_file.files
|
||||
install -m 0755 %{SOURCE0} $RPM_BUILD_ROOT/usr/lib/obs/service
|
||||
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/obs/service
|
||||
install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/obs/service/format_spec_file.files
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/obs
|
||||
/usr/lib/obs/service
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
|
@ -95,7 +95,7 @@ sub capitalize_case($)
|
||||
|
||||
sub maybe_add_empty_line()
|
||||
{
|
||||
push @oldspec, ""
|
||||
push @oldspec, "XXXBLANKLINE"
|
||||
if ($current_section ne "description" && $oldspec[-1] !~ /^\s*$/);
|
||||
}
|
||||
|
||||
@ -284,6 +284,7 @@ sub read_and_parse_old_spec {
|
||||
$args[1] =~ s/^\!//;
|
||||
$if_not = 1;
|
||||
}
|
||||
$args[2] = "" unless $args[2];
|
||||
if ( ($args[1] eq "0")
|
||||
|| ($args[1] eq "%name" && $args[2] eq "!=" && $args[3] eq $base_package)
|
||||
|| ($args[1] eq "%name" && $args[2] eq "==" && $args[3] ne $base_package)
|
||||
@ -382,7 +383,7 @@ sub read_and_parse_old_spec {
|
||||
warn "changed to $current_section for $_\n" if $debug;
|
||||
}
|
||||
|
||||
push @oldspec, $_;
|
||||
push @oldspec, "$_";
|
||||
# multiline macros need an extra newline with old RPMs
|
||||
if (/^%(\w[\w\d]+).*[^\\]$/) {
|
||||
push @oldspec, "" if (defined($multiline_macros{$1}));
|
||||
|
Loading…
Reference in New Issue
Block a user