Mailinglist Archive: opensuse-factory (757 mails)

< Previous Next >
Re: [opensuse-factory] Adding *.sel to an installation source
On Fri, May 19, 2006 at 12:12:25PM +0200, Ulrich Windl wrote:
> In awk something like this:
> awk 'BEGIN { FREE=0 }
> /^=Ord:/ { if ($2 > FREE) FREE=$2 }
> END { print "next available ord is", FREE + 1 }' *.sel

Thanks. I see what you mean. This is a good solution for makeSUSEdvd. I have
found an even better solution: Negative numbers. :-)

ORDER=`grep "^=Ord:" $RPMS_DIR/suse/setup/descr/*.sel| \
awk '{print $NF}'|sort -u|head -n 1`
let ORDER=$ORDER-1

Now it will be always at the top of the selection. As people have added
these on purpose, that is where it should be.

An example. I added a directory with just makeSUSEdvd RPM in it:
houghi@penne : cat 7/suse/setup/descr/makeSUSEdvd.sel
=Ver: 4.0
=Sel: Personal noarch
=Sum: Personal selection
+Des: Personal added Selections
-Des:
=Cat: addon
=Vis: true
=Ord: $ORDER
+Ins:
makeSUSEdvd
-Ins:

http://houghi.org/shots/susescreen010.jpg


It stil would be nice if there are fixed ranges to be used.
--
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
References