aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-09-08 11:08:46 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-09-09 15:06:23 +0200
commitf4a2e1372fbfc5f364b3f3360f6cf72587a70ff4 (patch)
tree73671eb4c27e77a5ffbe73b1b565c2cc47b5444d
parentae31cb53a9a7edbf041afc160654181e8f29d60e (diff)
downloadrpm-setup-f4a2e1372fbfc5f364b3f3360f6cf72587a70ff4.tar
rpm-setup-f4a2e1372fbfc5f364b3f3360f6cf72587a70ff4.tar.gz
rpm-setup-f4a2e1372fbfc5f364b3f3360f6cf72587a70ff4.tar.bz2
rpm-setup-f4a2e1372fbfc5f364b3f3360f6cf72587a70ff4.tar.xz
rpm-setup-f4a2e1372fbfc5f364b3f3360f6cf72587a70ff4.zip
reduce diff with upstream: sync comments
-rwxr-xr-xperl.prov26
-rwxr-xr-xperl.req31
2 files changed, 36 insertions, 21 deletions
diff --git a/perl.prov b/perl.prov
index 1668d29..d6839a0 100755
--- a/perl.prov
+++ b/perl.prov
@@ -19,7 +19,7 @@
# a simple script to print the proper name for perl libraries.
-# To save development time I do not parse the perl grammmar but
+# To save development time I do not parse the perl grammar but
# instead just lex it looking for what I want. I take special care to
# ignore comments and pod's.
@@ -68,7 +68,7 @@ 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_* variable when I upgrade.
@@ -154,11 +154,15 @@ sub process_file {
# here are examples of VERSION lines from the perl distribution
- #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 270245 $ =~ /(\d+)\.(\d+)/);
- #ExtUtils/Install.pm:$VERSION = substr q$Revision: 270245 $, 10;
- #CGI/Apache.pm:$VERSION = (qw$Revision: 270245 $)[1];
+ #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.9 $ =~ /(\d+)\.(\d+)/);
+ #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
- #$Locale::Maketext::Simple::VERSION = '0.21';
+ #General.pm:$Config::General::VERSION = 2.33;
+ #
+ # or with the new "our" pragma you could (read will) see:
+ #
+ # our $VERSION = '1.00'
if (
$package &&
@@ -180,6 +184,16 @@ sub process_file {
$require{$package} = $version;
}
+ # Allow someone to have a variable that defines virtual packages
+ # The variable is called $RPM_Provides. It must be scoped with
+ # "our", but not "local" or "my" (just would not make sense).
+ #
+ # For instance:
+ #
+ # $RPM_Provides = "blah bleah"
+ #
+ # Will generate provides for "blah" and "bleah".
+ #
# Each keyword can appear multiple times. Don't
# bother with datastructures to store these strings,
# if we need to print it print it now.
diff --git a/perl.req b/perl.req
index fcba2fc..4e43ef4 100755
--- a/perl.req
+++ b/perl.req
@@ -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,9 +17,9 @@
# 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
+# To save development time I do not parse the perl grammar but
# instead just lex it looking for what I want. I take special care to
# ignore comments and pod's.
@@ -60,7 +60,7 @@ 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_* variable when I upgrade.
@@ -144,7 +144,7 @@ sub process_file {
my ($whitespace, $statement, $module, $version) = ($1, $2, $3,$4);
my $usebase;
- # we only consider require statements that are flush against
+ # we only consider require statements that are flushed against
# the left edge. any other require statements give too many
# false positives, as they are usually inside of an if statement
# as a fallback module or a rarely used option
@@ -157,10 +157,10 @@ 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
+ # if the module ends in a comma we probably caught some
# documentation of the form 'check stuff,\n do stuff, clean
# stuff.' there are several of these in the perl distribution
@@ -172,8 +172,7 @@ sub process_file {
# ($module =~ m/^\./) && next;
- # if the module ends with .pm strip it to leave only basename.
- # starts with /, which means its an absolute path to a file
+ # if the module starts with /, it is an absolute path to a file
if ($module =~ m(^/)) {
print "$module\n";
next;
@@ -191,11 +190,12 @@ sub process_file {
$module =~ s/#.*//;
$usebase = 1;
}
- # 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/\(.*$//;
+ # if the module ends with .pm, strip it to leave only basename.
$module =~ s/\.pm$//;
# some perl programmers write 'require URI/URL;' when
@@ -203,22 +203,23 @@ 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*\)$//;
# if module is a number then both require and use interpret that
- # to mean that a particular version of perl is specified. Don't
- # add a dependency, though, since the rpm will already require
- # perl-base at the build version (via find-requires)
+ # to mean that a particular version of perl is specified
next if $module =~ /^v?\d/;
# ph files do not use the package name inside the file.
# perlmodlib documentation says:
+
# the .ph files made by h2ph will probably end up as
# extension modules made by h2xs.
- # so do not spend much effort on these.
+
+ # so do not expend much effort on these.
+
# there is no easy way to find out if a file named systeminfo.ph
# will be included with the name sys/systeminfo.ph so only use the