rpm/rpm-4.4.2.1-perl-reqprov.patch

113 lines
4.1 KiB
Diff
Raw Normal View History

diff -r 9f1a7ebe1223 -r 9f0012fffce1 scripts/perl.req
--- a/scripts/perl.req Fri Aug 10 10:02:25 2007 +0200
+++ b/scripts/perl.req Fri Aug 10 11:41:24 2007 +0300
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# RPM (and it's source code) is covered under two separate licenses.
+# RPM (and its source code) is covered under two separate licenses.
# The entire code base may be distributed under the terms of the GNU
# General Public License (GPL), which appears immediately below.
@@ -17,7 +17,7 @@
# Any questions regarding the licensing of RPM should be addressed to
# Erik Troan <ewt@redhat.com>.
-# a simple makedepends like script for perl.
+# a simple makedepend like script for perl.
# To save development time I do not parse the perl grammmar but
# instead just lex it looking for what I want. I take special care to
@@ -59,9 +59,9 @@ foreach $module (sort keys %require) {
print "perl($module)\n";
} else {
- # I am not using rpm3.0 so I do not want spaces arround my
+ # I am not using rpm3.0 so I do not want spaces around my
# operators. Also I will need to change the processing of the
- # $RPM_* vairable when I upgrage.
+ # $RPM_* variable when I upgrade.
print "perl($module) >= $require{$module}\n";
}
@@ -82,11 +82,22 @@ sub process_file {
# skip the "= <<" block
- if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/i) ||
- ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/i) ) {
+ if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/) ||
+ ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/) ) {
$tag = $2;
while (<FILE>) {
( $_ =~ /^$tag/) && last;
+ }
+ }
+
+ # skip q{} quoted sections - just hope we don't have curly brackets
+ # within the quote, nor an escaped hash mark that isn't a comment
+ # marker, such as occurs right here. Draw the line somewhere.
+ if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
+ $tag = $1;
+ $tag =~ tr/{\(\[\#|\//})]#|\//;
+ while (<FILE>) {
+ ( $_ =~ m/\}/ ) && last;
}
}
@@ -153,7 +164,7 @@ sub process_file {
($module =~ m/\$/) && next;
- # skip if the phrase was "use of" -- shows up in gimp-perl, et al
+ # skip if the phrase was "use of" -- shows up in gimp-perl, et al.
next if $module eq 'of';
# if the module ends in a comma we probaly caught some
@@ -175,7 +186,7 @@ sub process_file {
next;
}
- # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc
+ # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc.
# we can strip qw.*$, as well as (.*$:
$module =~ s/qw.*$//;
$module =~ s/\(.*$//;
@@ -187,7 +198,7 @@ sub process_file {
$module =~ s/\//::/;
- # trim off trailing parenthesis if any. Sometimes people pass
+ # trim off trailing parentheses if any. Sometimes people pass
# the module an empty list.
$module =~ s/\(\s*\)$//;
@@ -208,7 +219,7 @@ sub process_file {
};
# ph files do not use the package name inside the file.
- # perlmodlib documentation says:
+ # perlmodlib documentation says:
# the .ph files made by h2ph will probably end up as
# extension modules made by h2xs.
diff -r fb37e4dccbf3 -r 0408b648de46 scripts/perl.prov
--- a/scripts/perl.prov Sat Jul 21 15:05:19 2007 +0300
+++ b/scripts/perl.prov Sat Jul 21 15:48:03 2007 +0300
@@ -144,11 +144,12 @@ sub process_file {
#ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.9 $, 10;
#CGI/Apache.pm:$VERSION = (qw$Revision: 1.9 $)[1];
#DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
+ #General.pm:$Config::General::VERSION = 2.33;
#
# or with the new "our" pragma you could (read will) see:
#
# our $VERSION = '1.00'
- if (($package) && (m/^\s*(our\s+)?\$VERSION\s*=\s+/)) {
+ if (($package) && (m/^\s*(our\s+)?\$(\Q$package\E::)?VERSION\s*=\s+/)) {
# first see if the version string contains the string
# '$Revision' this often causes bizzare strings and is the most