1
0

- more work on disabled subpackages, port from internal

prepare_spec

OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-format_spec_file?expand=0&rev=20
This commit is contained in:
Ruediger Oertel 2011-08-08 14:06:29 +00:00 committed by Git OBS Bridge
parent fa1673e9ba
commit e6010bfc12
2 changed files with 21 additions and 13 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Aug 8 14:05:45 UTC 2011 - ro@suse.com
- more work on disabled subpackages, port from internal
prepare_spec
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 1 17:29:28 CEST 2011 - ro@suse.de Mon Aug 1 17:29:28 CEST 2011 - ro@suse.de

View File

@ -345,8 +345,10 @@ sub read_and_parse_old_spec {
warn "after: $_\n"; warn "after: $_\n";
} }
($current_package, $current_lang) = set_current_pkg ( $_ ); ($current_package, $current_lang) = set_current_pkg ( $_ );
$disabled_packs->{$current_package} = 1 if $ifhandler->{"disabled"}; if ($ifhandler->{"disabled"}) {
warn "$current_package is disabled\n" if $ifhandler->{"disabled"} && $debug; $disabled_packs->{$current_package} = 1;
warn "$current_package is disabled\n" if $debug;
}
next; next;
} }
if ( /^%description\b/i ) { if ( /^%description\b/i ) {
@ -424,8 +426,8 @@ sub read_and_parse_old_spec {
$_ =~ s/^[^:]+:/BuildArch:/; $_ =~ s/^[^:]+:/BuildArch:/;
} }
if ( /^Release\s*:\s*(.*)/i ) { if ( /^Release\s*:\s*(.*)/i ) {
$pkg_release{$current_package} = $_; $pkg_release{$c_pack} = $_;
$replace_hash{"XXXRELEASE $current_package"} = sprintf("%-16s%s","Release:", $1); $replace_hash{"XXXRELEASE $c_pack"} = sprintf("%-16s%s","Release:", $1);
next; next;
} }
if ( /^BuildRoot\s*:/i ) { if ( /^BuildRoot\s*:/i ) {
@ -433,13 +435,13 @@ sub read_and_parse_old_spec {
next; next;
} }
if ( /^Copyright\s*:\s*(.*)/i || /^License\s*:\s*(.*)/i ) { if ( /^Copyright\s*:\s*(.*)/i || /^License\s*:\s*(.*)/i ) {
$replace_hash{"XXXLICENSE $current_package"} = sprintf("%-16s%s","License:", $1); $replace_hash{"XXXLICENSE $c_pack"} = sprintf("%-16s%s","License:", $1);
push @oldspec, "XXXLICENSE $current_package"; push @oldspec, "XXXLICENSE $c_pack";
next; next;
} }
if ( /^Url\s*:\s*(.*)/i ) { if ( /^Url\s*:\s*(.*)/i ) {
$replace_hash{"XXXURL $current_package"} = sprintf("%-16s%s","Url:", $1); $replace_hash{"XXXURL $c_pack"} = sprintf("%-16s%s","Url:", $1);
push @oldspec, "XXXURL $current_package"; push @oldspec, "XXXURL $c_pack";
next; next;
} }
if ( m/$global_tags_re\s*(.*)/oi ) { if ( m/$global_tags_re\s*(.*)/oi ) {
@ -450,11 +452,11 @@ sub read_and_parse_old_spec {
} }
if ( /^Version:/ ) { if ( /^Version:/ ) {
warn "found Version, section = $current_section\n" if $debug; warn "found Version, section = $current_section\n" if $debug;
$version{$current_package} = $_; $version{$c_pack} = $_;
$version{$current_package} =~ s/^Version:\s*(.*)\s*/$1/; $version{$c_pack} =~ s/^Version:\s*(.*)\s*/$1/;
$replace_hash{"XXXVERSION $current_package"} = sprintf("%-16s%s","Version:",$version{$current_package}); $replace_hash{"XXXVERSION $c_pack"} = sprintf("%-16s%s","Version:",$version{$c_pack});
push @oldspec, $replace_hash{"XXXVERSION $current_package"}; push @oldspec, $replace_hash{"XXXVERSION $c_pack"};
push @oldspec, "XXXRELEASE $current_package"; push @oldspec, "XXXRELEASE $c_pack";
next; next;
} }
} }