Mailinglist Archive: opensuse-factory (757 mails)

< Previous Next >
Re: [opensuse-factory] Online update issue
On Wed, May 17, 2006 at 05:31:00PM +0300, Andras Mantia wrote:
> On Tuesday 16 May 2006 20:06, houghi wrote:
> > I am trying to figure out a foolproof way to get this done right.
> > Doing the copying in 'normal' order instead of reverse is not a
> > foolproof way.
>
> First copy the ISOs that are not labeled CD1...5 and later the CD1...5
> in reverse order. I'm sure it can be done with some bash/sed/grep
> magic. Like:
> suseisos=`ls -1 *.iso | grep -e "CD[1-5]"`
> extraisos=`ls -1 *.iso | grep -ve "CD[1-5]"`
>
> First process each entry from $extraisos and later $suseisos in reverse
> order.

The problem is that I do not know how things are numberd. At this moment I
have done it as follows:
1) Looked what the server sends back and put that in a parameter:
VERSIONS="SUSE-Linux-10.1-CD-download-ppc
SUSE-Linux-10.1-CD-download-x86
SUSE-Linux-10.1-CD-download-x86_64
...
2) See if there is a line that has one of the above in /content
3) Replacewhat is found to /content Most of the time this will be
identical

#Naming start
for I in $VERSIONS
do
NAME=`grep $I $CD_DIR/content|awk '{print $2}'`
if [ "$NAME" != "" ]
then
PRODUCTS=$NAME
fi
done
echo ""
<snip>
#Place the correct version
FILE=$CD_DIR/content
OLD=`grep DISTPRODUCT $FILE|awk '{print $2}'`
sed -e "s/$OLD/$PRODUCTS/g" $FILE > $FILE.tmp
mv $FILE.tmp $FILE

FILE=$CD_DIR/media.1/products
sed -e "s/$OLD/$PRODUCTS/g" $FILE > $FILE.tmp
mv $FILE.tmp $FILE


Also it might be that there is no CD[1-5] because they use a DVD, or
nameing changes with a next version, or people use real CDs.
I also do not have the names of all ISOs available from SUSE.

Now I am just waiting for somebody to verify that this is the correct way
to go. http://houghi.org/scripts/makeSUSEdvd is a beta. Some other nice
small differences.

I personally have recompiled mkisofs with:
[17:00:57] [~/tmp/cdrtools-2.01/mkisofs]
houghi@penne : diff write.c.orig write.c
521c521
< fprintf(stderr, "%6.2f%% done, estimate finish %s",
---
> fprintf(stderr, "%6.2f%% done, estimate finish : in a bit. \r",
524c524
< fprintf(stderr, "%3d.%-02d%% done, estimate finish %s",
---
> fprintf(stderr, "%3d.%-02d%% done, estimate finish : in a bit. \r",

That way I don't have all these new lines (... %s \r", did not work)
--
houghi http://houghi.org http://www.plainfaqs.org/linux/
http://www.netmeister.org/news/learn2quote.html
>
> Today I went outside. My pupils have never been tinier...

< Previous Next >
Follow Ups