tweaking lvu

wookietreiber kizkizzbangbang at googlemail.com
Sun Jan 16 11:21:52 CET 2011


Hello,

as I posted here: http://bugs.lunar-linux.org/view.php?id=450 I discovered that 'lvu' displayed some things wrong.

Those are/were:
lvu size      (errors on exiled modules)
lvu installed (shows exiled modules)
lvu leafs     (shows exiled modules)
lvu orphans   (does not check held modules)

Those all handle /var/state/lunar/packages wrong, which is in lvu as $MODULE_STATUS.

I attached a patch to fix those issues.

The solution in every case is using:
grep -E ":installed:|:held:" $MODULE_STATUS

":installed:|:held:" is an alternation pattern which displays all the lines containing either ":installed:" or ":held:".

I tested the patch and all four mentioned functions now seem to work well -- I have tested with exiled modules as well as held modules. In case there are other stati apart from installed, held and exiled please add them to the patch.

Please apply it to lunar/theedge.

Best regards
Christian Krause aka wookietreiber
-------------- next part --------------
406c406
<   for  MODULE  in  $(cat  $MODULE_STATUS  |  cut  -d :  -f1) ;  do
---
>   for  MODULE  in  $(grep -E ":installed:|:held:"  $MODULE_STATUS  |  cut  -d :  -f1) ;  do
417c417
<   for MODULE in $(grep :installed: $MODULE_STATUS | cut -d: -f1 | sort | uniq) ; do
---
>   for MODULE in $(grep -E ":installed:|:held:" $MODULE_STATUS | cut -d: -f1 | sort | uniq) ; do
1138c1138
<         view_file $MODULE_STATUS
---
>         grep -E ":installed:|:held:" $MODULE_STATUS | view_file
1325c1325
<         MODULES=$(cat $MODULE_STATUS | cut -d: -f1 | sort)
---
>         MODULES=$(grep -E ":installed:|:held:" $MODULE_STATUS | cut -d: -f1 | sort)


More information about the Lunar-dev mailing list