[PLUG] Re: Red Hat ? How to find a file on a CDROM
Keith Lofstrom
keithl at kl-ic.com
Tue Feb 1 20:54:18 UTC 2005
On Tue, 1 Feb 2005, Norm Coder wrote:
> I have been asked to install a couple program from the Red Hat WS3 CDROM.
> When I ran a find -name 'tcl-devel*' on each CD and came up with nothing.
> Then I realized the files I was looking for must be embedded in an .rpm
> file. My first question is where would I find the following files? Is
> there a way to search for them on the CD other than what I did? I also
> know I should be able to install these programs using System Settings,
> Add/Remove Applications. In case that didn't work I wanted to know the
> other way using the rpm -ivh command.
When I load a new distro, I unpack all the iso's into a subdirectory
of my "spare" partition so I have a huge directory full of rpms.
(Probably I should just keep the iso's around and mount them in
loopback). In any case, given the long string of rpms, either from
a directory or a mounted iso, I run a bash script that lists all the
iso contents and puts them into a text file for later searching. The
core of the script does this:
for file in `find $dir -type f -print | grep rpm`
do
/bin/echo \
"$iso $file ----------------------------------" \
>> $OUT
/bin/rpm -qilp $file >> $OUT
/bin/echo "" >> $OUT
done
If I ever get the motivation to it right, I would build three
scripts, the first that loops through and mounts and unmounts
all the iso's in a distribution to make the big long list.
The second script greps through this file for a particular
string, and lists the rpms that contain it. A third script,
given the rpm, mounts the iso containing the rpm and loads
the rpm. A fourth script might be a cheesy kind of "yum",
that not only loads an rpm but all it's dependencies in the
appropriate order.
But I am too lazy, and that kind of setup is useful enough that
you would think someone would already have written it. I am
too lazy to even go hunting for it at sourceforge or whatever.
Keith
--
Keith Lofstrom keithl at keithl.com Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs
More information about the PLUG
mailing list