On Sun, 4 May 2003 11:40:16 -0700 (PDT)
Martin
Is there a way to extract just specific files from rpm package?
mc will use a "virtual filesystem" to let you pull files out of an rpm, but I usually use this script. It will rip an rpm into the current directory. It works great. ############################################### #!/usr/bin/perl use warnings; use strict; use Cwd; use File::Path; if ($#ARGV < 0){print<<'EOT'; Usage: rpmrip 1.rpm 2.rpm 3.rpm....... Will install the given rpm (or spm) into the current directory. EOT exit; } my $td=cwd(); ## make fake rpm database in current directory print "Creating rpm db directory $td/var/lib/rpm\n"; #system('mkdir','-p','var/lib/rpm'); mkpath ('var/lib/rpm'); print "Initializing rpm db\n"; system ('rpm','--root',$td,'--dbpath','/var/lib/rpm','--initdb'); foreach (@ARGV){ system ('rpm','--notriggers','--noscripts','--nodeps','--force', '--ignorearch','--ignoreos', '--relocate',"/=/$td",'--badreloc', '--define',"_dbpath $td/var/lib/rpm", '--define',"_topdir $td", '-Uvh', $_)} rmtree ('var',0,0); print 'Source spm\'s are in SOURCE, binary rpms are in dirs',"\n\n"; __END__ -- use Perl; #powerful programmable prestidigitation