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`

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
=Cat: addon
=Vis: true
=Ord: $ORDER

It stil would be nice if there are fixed ranges to be used.
> Today I went outside. My pupils have never been tinier...

< Previous Next >
Follow Ups