[Slapt-get-user] Search MANIFEST.TGZ
Nathan Morell
frizop at eatel.net
Fri Oct 29 23:04:33 EDT 2004
Peace Maker Maker wrote:
> Is there a way to sarch the contents of packages, much like scanning
> MANIFEST.TGZ in order to find out which package a particular file
> belongs to? Thanks.
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's
> FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> _______________________________________________
> Slapt-get-user mailing list
> Slapt-get-user at software.jaos.org
> http://software.jaos.org/cgi-bin/mailman/listinfo/slapt-get-user
>
>
I wrote a perl script to search thru MANIFEST.gz, which must be
converted from the MANIFEST.bz2 found on slackware.com's FTP.
file is attached. you'll have to change the location in the script to
point to where ever you put your manifest file, I think its self
explinatory.
--Nathan
-------------- next part --------------
#!/usr/bin/perl
use strict;
use warnings;
use PerlIO::gzip;
open FOO, "<:gzip", "/home/jidar/MANIFEST.gz" or die $!;
my $temp;
while (<FOO>){ # And it will be uncompressed...
if ($_ =~ m/\|\| Package: /g) {
$_ =~ s/\|\| Package: /PACKAGE: /g;
$temp = $_;
}
if ($_ =~ m/($ARGV[0])/g) {
print $temp . $_;
}
}
More information about the Slapt-get-user
mailing list