summaryrefslogtreecommitdiff
path: root/scripts/perl.prov
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2007-02-22 12:26:10 +0000
committerPaul Nasrat <pnasrat@redhat.com>2007-02-22 12:26:10 +0000
commitd9cd2282fd98995c6ae1d35d06dd0e810d18ee8f (patch)
tree79ab1afd9db6dee6c55e76420a4958b39c3ab5cb /scripts/perl.prov
parent152c452c108c0d6a2a591077352f9a61f20eaa9c (diff)
downloadlibrpm-tizen-d9cd2282fd98995c6ae1d35d06dd0e810d18ee8f.tar.gz
librpm-tizen-d9cd2282fd98995c6ae1d35d06dd0e810d18ee8f.tar.bz2
librpm-tizen-d9cd2282fd98995c6ae1d35d06dd0e810d18ee8f.zip
Filter out incorrect perl(main) provides (rh#177960).
Diffstat (limited to 'scripts/perl.prov')
-rwxr-xr-xscripts/perl.prov10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/perl.prov b/scripts/perl.prov
index d423d6ad2..328496ded 100755
--- a/scripts/perl.prov
+++ b/scripts/perl.prov
@@ -121,13 +121,17 @@ 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*;/) {
$package=$1;
undef $version;
- $require{$package}=undef;
+ if ($package eq 'main') {
+ undef $package;
+ } else {
+ $require{$package}=undef;
+ }
}
# after we found the package name take the first assignment to