How ignoring install errors?
Grant McWilliams
grantmasterflash at gmail.com
Mon Oct 1 12:35:41 PDT 2007
On 10/1/07, Rolf Niepraschk <Rolf.Niepraschk at gmx.de> wrote:
>
>
> Hello,
>
> I want do a new installation of openSUSE in the following way:
>
> o Create a list of installed packages in openSUSE 10.2
>
> smart query --installed | grep '@' | sed -r -e 's/-[^-]+-[^-]+ at .+//g' \
> > installed.txt
>
> o New installation of a base openSUSE 10.3 system
>
> o update of the channel list to the new "10.3" channels
>
> o Installation of the missing packages:
>
> smart install --yes `cat installed.txt`
>
> Unfortunately it doesn't work because
>
> * Not all channels are yet ready for "10.3".
> * Some packages are not related to any channels (installed via
> "smart install http://..../package.rpm")
> * ...
>
> "smart" exits at the first package which can't be find in any channel.
> What I need is a way to ignore such "install errors". What can I do?
> Many thanks in advance.
>
> ...Rolf
We've done this for CentOS5 and basically created a shell script that
disables yum, sets up smart repositories, get's a list of "base rpms" that
we install and then does a for loop through them. The return code from Smart
on the commandline isn't reliable so you just have to dumbly walk through
and try to install the argument.
Here's the logic - I don't have the source with me right now.
Download yum repo for rpmforge and atrpms
yum update
yum install smart
Download the <base rpms list> from a server (output of rpm -q) we manage
Download the channels list (output from smart channel --show)
Download the mirror list (output from smart mirror --show)
smart channel --add ./<base rpms list>
Add smart mirrors (but I don't remember exactly how)
reload smart cache
smart update
IFS=$'\n' # in case there are spaces in the name...
for RPM in $(cat <base rpms list>
do
strip the application name out of the rpm file name
smart install application name
done
Some of this is actual BASH code but most is just flow. You'll need to
replace the other stuff with real BASH code. If smart gave reliable rc codes
the script would work better. It just has to brute force it's way through.
Grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.labix.org/pipermail/smart-labix.org/attachments/20071001/109f53cd/attachment-0003.htm>
More information about the Smart
mailing list