On 10/1/07, <b class="gmail_sendername">Rolf Niepraschk</b> <<a href="mailto:Rolf.Niepraschk@gmx.de">Rolf.Niepraschk@gmx.de</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hello,<br><br>I want do a new installation of openSUSE in the following way:<br><br>o Create a list of installed packages in openSUSE 10.2<br><br>smart query --installed | grep '@' | sed -r -e 's/-[^-]+-[^-]+@.+//g' \
<br> > installed.txt<br><br>o New installation of a base openSUSE 10.3 system<br><br>o update of the channel list to the new "10.3" channels<br><br>o Installation of the missing packages:<br><br>smart install --yes `cat
installed.txt`<br><br>Unfortunately it doesn't work because<br><br> * Not all channels are yet ready for "10.3".<br> * Some packages are not related to any channels (installed via<br> "smart install http://..../package.rpm")
<br> * ...<br><br>"smart" exits at the first package which can't be find in any channel.<br>What I need is a way to ignore such "install errors". What can I do?<br>Many thanks in advance.<br><br>...Rolf
</blockquote><div><br><br>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.
<br><br>Here's the logic - I don't have the source with me right now.<br><br><div style="margin-left: 40px;">Download yum repo for rpmforge and atrpms<br>yum update<br>yum install smart<br></div><div style="margin-left: 40px;">
Download the <base rpms list> from a server (output of rpm -q) we manage<br>Download the channels list (output from smart channel --show)<br>Download the mirror list (output from smart mirror --show)<br>smart channel --add ./<base rpms list>
<br>Add smart mirrors (but I don't remember exactly how)<br>reload smart cache <br>smart update <br>IFS=$'\n' # in case there are spaces in the name...<br>for RPM in $(cat <base rpms list><br>do<br><div style="margin-left: 40px;">
strip the application name out of the rpm file name<br>smart install application name<br></div>done<br></div><br>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.
<br></div><br>Grant<br></div><br>