X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-perl-req-perlfile.patch;h=93a395032324456dabf7a60e600a6e75d1dcda4c;hb=4fc9797e6cc2d163541d38dea8cc5ebeaaa40fa6;hp=45043f743eb062a9fe900b01dafe6add6cbf9fd1;hpb=2699ff919079f4ea750db78e2459d81a26fb8e2f;p=packages%2Frpm.git diff --git a/rpm-perl-req-perlfile.patch b/rpm-perl-req-perlfile.patch index 45043f7..93a3950 100644 --- a/rpm-perl-req-perlfile.patch +++ b/rpm-perl-req-perlfile.patch @@ -1,6 +1,18 @@ ---- rpm-4.0/scripts/perl.req Wed Jul 5 14:26:37 2000 -+++ rpm-4.0.new/scripts/perl.req Wed Nov 15 21:31:03 2000 -@@ -82,6 +82,53 @@ +--- rpm-4.0/scripts/perl.req Mon Dec 16 11:36:15 2000 ++++ rpm-4.0.mis/scripts/perl.req Mon Dec 16 11:46:28 2000 +@@ -61,6 +61,11 @@ + } + } + ++foreach (sort keys %provide) { ++ delete $require{$_}; ++} ++delete $require{the}; # don't count "use the sth" as perl module ++ + + foreach $module (sort keys %require) { + if (length($require{$module}) == 0) { +@@ -82,6 +86,53 @@ exit 0; @@ -54,7 +66,7 @@ sub process_file { -@@ -90,6 +137,8 @@ +@@ -90,6 +141,8 @@ open(FILE, "<$file")|| die("$0: Could not open file: '$file' : $!\n"); @@ -63,7 +75,18 @@ while () { -@@ -209,6 +258,10 @@ +@@ -112,6 +165,10 @@ + last; + } + ++ if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) { ++ $provide{$1} = 1; ++ } ++ + # Each keyword can appear multiple times. Don't + # bother with datastructures to store these strings, + # if we need to print it print it now. +@@ -209,6 +266,10 @@ # if the module name starts in a dot it is not a module name. ($module =~ m/^\./) && next;