summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-08-28 08:52:06 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-08-28 08:52:06 +0300
commit10d01f417760b655fec562234e09aee2f85c64f2 (patch)
tree943cf3b048c1a558c116e723694857abe8d34110 /scripts
parentd702278169af2c69dabd783a5d6f18ecb18648ce (diff)
downloadlibrpm-tizen-10d01f417760b655fec562234e09aee2f85c64f2.tar.gz
librpm-tizen-10d01f417760b655fec562234e09aee2f85c64f2.tar.bz2
librpm-tizen-10d01f417760b655fec562234e09aee2f85c64f2.zip
Fix perl version provide for packages defined in multiple blocks (#rhbz214496)
Successive definitions of the same package shouldn't stomp on previously found $VERSION, this is how perl itself behaves. Patch from James Ralston.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/perl.prov6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/perl.prov b/scripts/perl.prov
index 8db73f29e..103488cf0 100755
--- a/scripts/perl.prov
+++ b/scripts/perl.prov
@@ -130,7 +130,11 @@ sub process_file {
if ($package eq 'main') {
undef $package;
} else {
- $require{$package}=undef;
+ # If $package already exists in the $require hash, it means
+ # the package definition is broken up over multiple blocks.
+ # In that case, don't stomp a previous $VERSION we might have
+ # found. (See BZ#214496.)
+ $require{$package}=undef unless (exists $require{$package});
}
}