diff options
author | jbj <devnull@localhost> | 2001-06-01 19:27:33 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-06-01 19:27:33 +0000 |
commit | 25f341822c555005b79494b1a02e0c3b4d1f8f8d (patch) | |
tree | dd2fc6162b4dc0b947ae7b6eab08e32c84abcc94 /scripts | |
parent | f5ebe3fb424b215dbd455cabd37f5ea56bd5dbff (diff) | |
download | rpm-25f341822c555005b79494b1a02e0c3b4d1f8f8d.tar.gz rpm-25f341822c555005b79494b1a02e0c3b4d1f8f8d.tar.bz2 rpm-25f341822c555005b79494b1a02e0c3b4d1f8f8d.zip |
- merge sparc64/ia64 fiddles back into linux.{req,prov}.
- automagically generate perl module dependencies always.
CVS patchset: 4825
CVS date: 2001/06/01 19:27:33
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/find-requires.perl | 13 | ||||
-rwxr-xr-x | scripts/perl.prov | 13 | ||||
-rwxr-xr-x | scripts/perl.req | 5 |
3 files changed, 21 insertions, 10 deletions
diff --git a/scripts/find-requires.perl b/scripts/find-requires.perl index a4571007a..ae404e6f7 100755 --- a/scripts/find-requires.perl +++ b/scripts/find-requires.perl @@ -17,10 +17,23 @@ for f in $scriptlist; do esac done | sort -u +for f in $filelist; do + [ -r $f ] || continue + if echo $f | grep -q '\.pm$' + then + modules="$modules $f" + fi +done + +[ -n "$modules" ] && perllist="$perllist $modules" + # # Generate perl module dependencies, if any. set -x [ -x /usr/lib/rpm/perl.req -a -n "$perllist" ] && \ echo $perllist | tr [:blank:] \\n | /usr/lib/rpm/perl.req | sort -u + +# +# Then process the files as usual. set +x echo $filelist | /usr/lib/rpm/find-requires diff --git a/scripts/perl.prov b/scripts/perl.prov index c9723f8a4..1dc6a6290 100755 --- a/scripts/perl.prov +++ b/scripts/perl.prov @@ -67,7 +67,7 @@ foreach $module (sort keys %require) { # I am not using rpm3.0 so I do not want spaces arround my # operators. Also I will need to change the processing of the - # $RPM_* vairable when I upgrade. + # $RPM_* variable when I upgrade. print "perl($module) = $require{$module}\n"; } @@ -82,8 +82,7 @@ sub process_file { my ($file) = @_; chomp $file; - open(FILE, "<$file")|| - die("$0: Could not open file: '$file' : $!\n"); + open(FILE, "<$file") || return; my ($package, $version) = (); @@ -124,9 +123,9 @@ sub process_file { # here are examples of VERSION lines from the perl distribution - #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/); - #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.3 $, 10; - #CGI/Apache.pm:$VERSION = (qw$Revision: 1.3 $)[1]; + #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/); + #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.4 $, 10; + #CGI/Apache.pm:$VERSION = (qw$Revision: 1.4 $)[1]; #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning if ( @@ -161,7 +160,7 @@ sub process_file { } - close(FILE)|| + close(FILE) || die("$0: Could not close file: '$file' : $!\n"); return ; diff --git a/scripts/perl.req b/scripts/perl.req index e63235d8b..6e287616f 100755 --- a/scripts/perl.req +++ b/scripts/perl.req @@ -76,8 +76,7 @@ sub process_file { my ($file) = @_; chomp $file; - open(FILE, "<$file")|| - die("$0: Could not open file: '$file' : $!\n"); + open(FILE, "<$file") || return; while (<FILE>) { @@ -192,7 +191,7 @@ sub process_file { } - close(FILE)|| + close(FILE) || die("$0: Could not close file: '$file' : $!\n"); return ; |