[Yum] How to get yum to read package names from a file

Jim McConnell jim at mcconnell.net
Sun Feb 15 22:44:31 UTC 2004


> > #!/bin/bash
> > for rpmfile in `cat foo`
> > do
> >     yum install $rpmfile
> > done
>
> that will be VERY VERY VERY slow.

Yes, it certainly would be.  I should've attempted to do that prior to
posting. (/me makes a mental note to do that in the future)

> for rpmfile in `cat foo`
> do
>   mylist="$mylist $rpmfile"
> done
> yum install $mylist

For that matter, let's forgo the loop entirely:

mylist=`cat foo`
yum install $mylist

(The above worked happily on FC1, w/ yum 2.0.4, and bash.)

-Jim




More information about the Yum mailing list