summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-10-05 15:14:02 +0200
committerMichael Schroeder <mls@suse.de>2012-10-05 15:15:17 +0200
commit9bbb3cca5103a6553e57ef39ad6818822d0ea5fa (patch)
tree605d385a04a28af72135a82303f0014532f85a56
parent11ef556a2632d42b79e894777f4865a5d77fc7dd (diff)
downloadbuild-9bbb3cca5103a6553e57ef39ad6818822d0ea5fa.tar.gz
build-9bbb3cca5103a6553e57ef39ad6818822d0ea5fa.tar.bz2
build-9bbb3cca5103a6553e57ef39ad6818822d0ea5fa.zip
bring forcebinary code in line with rpm by checking the SOURCEPACKAGE tag
-rw-r--r--Build/Rpm.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/Build/Rpm.pm b/Build/Rpm.pm
index caa339c..84d9ec6 100644
--- a/Build/Rpm.pm
+++ b/Build/Rpm.pm
@@ -569,7 +569,7 @@ my %rpmstag = (
"REQUIREVERSION" => 1050,
"NOSOURCE" => 1051,
"NOPATCH" => 1052,
- "RPMVERSION" => 1064,
+ "SOURCEPACKAGE" => 1106,
"PROVIDEFLAGS" => 1112,
"PROVIDEVERSION" => 1113,
"DIRINDEXES" => 1116,
@@ -722,11 +722,8 @@ sub rpmq {
}
}
}
- if ($forcebinary && $stags{1044} && !$res{$stags{1044}}) {
- # don't force for rpm-5 rpms
- if (!($stags{1064} && $res{$stags{1064}} && $res{$stags{1064}}->[0] =~ /^5/)) {
- $res{$stags{1044}} = [ '(none)' ]; # like rpm does...
- }
+ if ($forcebinary && $stags{1044} && !$res{$stags{1044}} && !($stags{1106} && $res{$stags{1106}})) {
+ $res{$stags{1044}} = [ '(none)' ]; # like rpm does...
}
if ($need_filenames) {
@@ -836,7 +833,7 @@ sub verscmp {
sub query {
my ($handle, %opts) = @_;
- my @tags = qw{NAME SOURCERPM NOSOURCE NOPATCH SIGTAG_MD5 PROVIDENAME PROVIDEFLAGS PROVIDEVERSION REQUIRENAME REQUIREFLAGS REQUIREVERSION RPMVERSION};
+ my @tags = qw{NAME SOURCERPM NOSOURCE NOPATCH SIGTAG_MD5 PROVIDENAME PROVIDEFLAGS PROVIDEVERSION REQUIRENAME REQUIREFLAGS REQUIREVERSION SOURCEPACKAGE};
push @tags, qw{EPOCH VERSION RELEASE ARCH};
push @tags, qw{FILENAMES} if $opts{'filelist'};
push @tags, qw{SUMMARY DESCRIPTION} if $opts{'description'};