Accepting request 78305 from openSUSE:Tools
- more work on disabled subpackages, port from internal prepare_spec - try to keep summary and group for cases like openldap2 (bnc#624980) OBS-URL: https://build.opensuse.org/request/show/78305 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-format_spec_file?expand=0&rev=9
This commit is contained in:
commit
f933923c54
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
|
||||||
|
- try to keep summary and group for cases like openldap2
|
||||||
|
(bnc#624980)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 4 11:42:26 CEST 2011 - ro@suse.de
|
Mon Jul 4 11:42:26 CEST 2011 - ro@suse.de
|
||||||
|
|
||||||
|
38
prepare_spec
38
prepare_spec
@ -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 ) {
|
||||||
@ -391,14 +393,16 @@ sub read_and_parse_old_spec {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($current_section eq "header") {
|
if ($current_section eq "header") {
|
||||||
|
my $c_pack = $current_package;
|
||||||
|
$c_pack .= "_disabled" if $ifhandler->{"disabled"};
|
||||||
if ( /^Summary\b\s*:\s*(.*)/i ) {
|
if ( /^Summary\b\s*:\s*(.*)/i ) {
|
||||||
$replace_hash{"XXXSUMMARY $current_package"} = sprintf("%-16s%s","Summary:", $1);
|
$replace_hash{"XXXSUMMARY $c_pack"} = sprintf("%-16s%s","Summary:", $1);
|
||||||
push @oldspec, "XXXSUMMARY $current_package";
|
push @oldspec, "XXXSUMMARY $c_pack";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ( /^Group\b\s*:\s*(.*)/i ) {
|
if ( /^Group\b\s*:\s*(.*)/i ) {
|
||||||
$replace_hash{"XXXGROUP $current_package"} = sprintf("%-16s%s", "Group:", $1);
|
$replace_hash{"XXXGROUP $c_pack"} = sprintf("%-16s%s", "Group:", $1);
|
||||||
push @oldspec, "XXXGROUP $current_package";
|
push @oldspec, "XXXGROUP $c_pack";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ( /^Vendor:/ || /^Distribution:/ || /^Packager:/ ) {
|
if ( /^Vendor:/ || /^Distribution:/ || /^Packager:/ ) {
|
||||||
@ -422,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 ) {
|
||||||
@ -431,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 ) {
|
||||||
@ -448,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user