Patch to show the --opts in lvu

Christian Riggenbach criggenbach at magahugu.ch
Tue Aug 17 20:36:24 CEST 2010


Hi folks

I have written a small patch for lvu, which enables the program to show
the given options (lin --opts) for modules. It extends "lvu info" with a
new line "Options:" and introduces the new command "lvu options".

I think it is necessary to enable an user to display this data, because it
can have huge affects on the compiled modules (and the value is kept over
to new builds).

-- 
mit freundlichem Gruss

Christian Riggenbach
-------------- next part --------------
--- bin/lvu	2008-02-05 20:05:01.000000000 +0100
+++ lvu	2010-08-17 20:20:50.813000026 +0200
@@ -62,10 +63,11 @@
 conflicts                  display conflicting files
 held                       display held modules
 exiled                     display exiled modules
 expired                    display a list of modules which need an update
 info        module         display terse summary information about module
+options     module         display the options (--opts) given to a module
 
 search      "phrase"       searches all modules long descriptions for phrase.
 service     port|acronym   displays modules that provide that service
 
 website     module         display a module's website
@@ -684,10 +723,11 @@
     echo "  Description:   $SHORT"
     echo "  Website:       $WEB_SITE"
     echo "  Lunar Version: $VERSION"
     echo "  Last Updated:  $UPDATED"
     echo "  Section:       $SECTION"
+    echo "  Options:       " $(get_module_config OPTS) | sed 's/\$OPTS//'
     echo -n "  Restrictions:  "
     if module_held $1 ; then
       echo -n "held "
     fi
     if module_exiled $1 ; then
@@ -1400,10 +1452,19 @@
          show_info $2
        fi
      fi
      ;;
 
+   options)
+     
+     if [ ! -z "$2" ] ; then
+       if run_details $2 ; then
+         echo $(get_module_config OPTS) | sed 's/\$OPTS//'
+       fi
+     fi
+     ;;
+	
    diff)
      diff_module $2
 	 ;;
 
    submit)


More information about the Lunar mailing list