X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=blobdiff_plain;f=rpm-perl-req-perlfile.patch;h=5fe81f943d0387afcdfdde5a50fa899c9df02d94;hp=93a395032324456dabf7a60e600a6e75d1dcda4c;hb=7f47af9c18b54415e74798ab187f4204d9407b14;hpb=7b1387608ae59908481fc3bf06decb1f2cdd0c54 diff --git a/rpm-perl-req-perlfile.patch b/rpm-perl-req-perlfile.patch index 93a3950..5fe81f9 100644 --- a/rpm-perl-req-perlfile.patch +++ b/rpm-perl-req-perlfile.patch @@ -1,7 +1,32 @@ ---- 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 @@ - } +--- rpm-4.2/scripts/perl.req.wigperl Tue Apr 1 13:33:52 2003 ++++ rpm-4.2/scripts/perl.req Tue Apr 1 13:39:47 2003 +@@ -39,28 +39,20 @@ + + # by Ken Estes Mail.com kestes@staff.mail.com + +-if ("@ARGV") { +- foreach (@ARGV) { ++foreach ( @ARGV ? @ARGV : <> ) { ++ chomp; + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { +- process_file($_); ++ process_file($_) if -f; + } + } +- } +-} else { +- +- # notice we are passed a list of filenames NOT as common in unix the +- # contents of the file. +- +- foreach (<>) { +- if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) { +- if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) { +- process_file($_); +- } +- } +- } } +foreach (sort keys %provide) { @@ -12,7 +37,7 @@ foreach $module (sort keys %require) { if (length($require{$module}) == 0) { -@@ -82,6 +86,53 @@ +@@ -82,6 +74,53 @@ exit 0; @@ -66,16 +91,16 @@ sub process_file { -@@ -90,6 +141,8 @@ +@@ -90,6 +129,8 @@ - open(FILE, "<$file")|| - die("$0: Could not open file: '$file' : $!\n"); -+ -+ return if (!is_perlfile($file, \*FILE)); + open(FILE, "<$file") || return; ++ return if (!is_perlfile($file, \*FILE)); ++ while () { -@@ -112,6 +165,10 @@ + # skip the documentation +@@ -111,6 +152,10 @@ last; } @@ -86,14 +111,14 @@ # 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. +@@ -236,6 +281,10 @@ ($module =~ m/^\./) && next; -+ + + # name starts in a non alphanumeric character it is not a module + # name. + ($module =~ m/^\W/) && next; - ++ # if the module ends with .pm strip it to leave only basename. + $module =~ s/\.pm$//;