diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-08-31 11:06:39 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-08-31 11:06:39 +0300 |
commit | 0b450467e2dac481deee139b7bc831e19efb11a4 (patch) | |
tree | 2b7293420bb8516397a5d92bac7a0d9c102dda4a /scripts | |
parent | 693ba3084b95813bcc4eaefcfd29d32e6b44bca5 (diff) | |
download | rpm-0b450467e2dac481deee139b7bc831e19efb11a4.tar.gz rpm-0b450467e2dac481deee139b7bc831e19efb11a4.tar.bz2 rpm-0b450467e2dac481deee139b7bc831e19efb11a4.zip |
Remove unused ancient sql.prov|req
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.am | 4 | ||||
-rwxr-xr-x | scripts/sql.prov | 115 | ||||
-rwxr-xr-x | scripts/sql.req | 108 |
3 files changed, 2 insertions, 225 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 9def65deb..6904a4d5c 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -14,7 +14,7 @@ EXTRA_DIST = \ magic.prov magic.req perldeps.pl perl.prov perl.req pythondeps.sh \ rpmdb_loadcvt rpmdiff rpmdiff.cgi \ rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \ - sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \ + tcl.req tgpg trpm u_pkg.sh \ vpkg-provides.sh vpkg-provides2.sh \ macros.perl.in macros.python.in \ macros.php.in find-requires.php find-provides.php \ @@ -35,5 +35,5 @@ config_SCRIPTS = \ mono-find-requires mono-find-provides \ rpmdb_loadcvt rpmdiff rpmdiff.cgi \ rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \ - sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \ + tcl.req tgpg trpm u_pkg.sh \ vpkg-provides.sh vpkg-provides2.sh diff --git a/scripts/sql.prov b/scripts/sql.prov deleted file mode 100755 index 5d2b31860..000000000 --- a/scripts/sql.prov +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/perl - -# RPM and it's source code are 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. -# Alternatively, all of the source code in the lib subdirectory of the -# RPM source code distribution as well as any code derived from that -# code may instead be distributed under the GNU Library General Public -# License (LGPL), at the choice of the distributor. The complete text -# of the LGPL appears at the bottom of this file. - -# This alternatively is allowed to enable applications to be linked -# against the RPM library (commonly called librpm) without forcing -# such applications to be distributed under the GPL. - -# Any questions regarding the licensing of RPM should be addressed to -# marc@redhat.com and ewt@redhat.com. - - -# sql.prov - a simple script to print the proper name for sql from -# both the sepecification and body files. - - -# by Ken Estes Mail.com kestes@staff.mail.com - -if ("@ARGV") { - foreach (@ARGV) { - process_file($_); - } -} else { - - # notice we are passed a list of filenames NOT as common in unix the - # contents of the file. - - foreach (<>) { - process_file($_); - } -} - - - -foreach $module (sort keys %require) { - print "sql($module)\n"; -} - -exit 0; - - - -sub process_file { - - my ($filename) = @_; - chomp $filename; - - open(FILE, "<$filename")|| - die("$0: Could not open file: '$filename' : $!\n"); - - my ($package, $version) = (); - - my (@file) = <FILE>; - - my ($file) = "@file"; - - close(FILE)|| - die("$0: Could not close file: '$file' : $!\n"); - - # skip the comments - - $file =~ s!/\*(.*?)\*/!!gs; - $file =~ s!\s*--(.*?)\n!\n!gm; - - @file = split(/\n/, $file); - - foreach (@file) { - - # remove strings - - s!\'[^\']*\'!!g; - - - # not everyone puts the package name of the file as the first - # package name so we report all namespaces as if they were - # provided packages (really ugly). - - if (m/\bpackage\s+(body\s*)?(\S+)\s+[ia]s/i) { - $package=$2; - $package=lc($package); - $require{$package}=1; - } - - if (m/((procedure)|(function))\s+(\S+)\s*\(/i) { - my $func = $4; - $func = lc($func); - if ($package) { - $require{"$package.$func"}=1; - } else { - $require{$func}=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. - - if ( m/^\s*\$RPM_Provides\s*:=\s*["'](.*)['"]/i) { - foreach $_ (spit(/\s+/, $1)) { - print "$_\n"; - } - } - - } - - return ; -} diff --git a/scripts/sql.req b/scripts/sql.req deleted file mode 100755 index 24fa97278..000000000 --- a/scripts/sql.req +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/perl - -# RPM and it's source code are 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. -# Alternatively, all of the source code in the lib subdirectory of the -# RPM source code distribution as well as any code derived from that -# code may instead be distributed under the GNU Library General Public -# License (LGPL), at the choice of the distributor. The complete text -# of the LGPL appears at the bottom of this file. - -# This alternatively is allowed to enable applications to be linked -# against the RPM library (commonly called librpm) without forcing -# such applications to be distributed under the GPL. - -# Any questions regarding the licensing of RPM should be addressed to -# marc@redhat.com and ewt@redhat.com. - - -# sql.req - a simple script to print the uses of sql functions. - - -# by Ken Estes Mail.com kestes@staff.mail.com - -if ("@ARGV") { - foreach (@ARGV) { - process_file($_); - } -} else { - - # notice we are passed a list of filenames NOT as common in unix the - # contents of the file. - - foreach (<>) { - process_file($_); - } -} - - - -foreach $module (sort keys %require) { - print "sql($module)\n"; -} - -exit 0; - - - -sub process_file { - - my ($filename) = @_; - chomp $filename; - - open(FILE, "<$filename")|| - die("$0: Could not open file: '$filename' : $!\n"); - - my ($package, $version) = (); - - my (@file) = <FILE>; - - my ($file) = "@file"; - - close(FILE)|| - die("$0: Could not close file: '$file' : $!\n"); - - # skip the comments - - # Suck the whole file in to make removing /* */ (multiple lines - # comments) comments easier - - $file =~ s!/\*(.*?)\*/!!gs; - $file =~ s!^\s*--(.*?)\n!\n!gm; - - @file = split(/\n/, $file); - - foreach (@file) { - - # remove strings - - s!\'[^\']*\'!!g; - - - # we are interested in function names which have a dot in them and - # are followed by an open parenthesis - - foreach ( m/([a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)\s*\(/ ) { - my $func = $_; - $func=lc($func); - $func =~ m/\.\./ && - next; - $require{$func}=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. - - if ( m/^\s*\$RPM_Provides\s*:=\s*["'](.*)['"]/i) { - foreach $_ (spit(/\s+/, $1)) { - print "$_\n"; - } - } - - } - - return ; -} |