aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-07-25 17:02:04 +0000
committerThierry Vignaud <tv@mageia.org>2012-07-25 17:02:04 +0000
commit594dc8fa866d31cd1325ac7aba6c56b6f8967e6f (patch)
tree67169181243f226d59fc1cedbecef0aae0778dc8
parent8847d2bd174fdcb5f02e52d3c3ac22fc89deaea4 (diff)
downloadrpm-setup-594dc8fa866d31cd1325ac7aba6c56b6f8967e6f.tar
rpm-setup-594dc8fa866d31cd1325ac7aba6c56b6f8967e6f.tar.gz
rpm-setup-594dc8fa866d31cd1325ac7aba6c56b6f8967e6f.tar.bz2
rpm-setup-594dc8fa866d31cd1325ac7aba6c56b6f8967e6f.tar.xz
rpm-setup-594dc8fa866d31cd1325ac7aba6c56b6f8967e6f.zip
sync with upstream rpm.org:
"Filter out incorrect perl(main) provides (rh#177960)" (Paul Nasrat, 2007-02-22)
-rw-r--r--NEWS1
-rwxr-xr-xperl.prov10
2 files changed, 8 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 22a6c1e..2dabcbd 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@
any need for it, reducing ~8K packages' dependency on it during next rebuild.
(Per Oyvind, mdv)
- perl.prov: sync with upstream rpm.org:
+ o filter out incorrect perl(main) provides (rh#177960)
o make perl.{req,prov} warn about unreadable files
o skip new-fangled head[34] while gerenerating deps (#118243)
o skip over =for ... perlpod construct (RhBug:477516)
diff --git a/perl.prov b/perl.prov
index db41847..7ac8c16 100755
--- a/perl.prov
+++ b/perl.prov
@@ -128,15 +128,19 @@ sub process_file {
}
# not everyone puts the package name of the file as the first
- # package name so we report all namespaces as if they were
- # provided packages (really ugly).
+ # package name so we report all namespaces except some common
+ # false positives as if they were provided packages (really ugly).
if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
# some internal packages, like DB, might be temporarily redefined inside a module.
if (!($package && $1 eq 'DB')) {
$package = $1;
undef $version;
- $require{$package} = undef;
+ if ($package eq 'main') {
+ undef $package;
+ } else {
+ $require{$package}=undef;
+ }
}
}