adding flag PROFILE to the DETAILS file

Samuel Verstraete samuel.verstraete at gmail.com
Thu Oct 26 11:19:38 CEST 2006


The attached patch will allow defining a PROFILE variable in the
DETAILS file of profile modules like XOrg7, xfce4-profile etc etc... so
users are no longer confronted with a warning that makes no sense. 

both "WARNING: module does not call prepare_install or installs zero
files" and the "! Problem detected" will be removed if the module is a
profile.

Adding hackish messages to the BUILD file like i did now with XOrg7
should then be a thing of the past (i did this because already 2 times
users complained that they thought XOrg7 was not installed correctly
due to this error)

Just add PROFILE=yes in the DETAILS file and try the patch.

gr,S.



~/lunar # svn diff
Index: var/lib/lunar/functions/build.lunar
===================================================================
--- var/lib/lunar/functions/build.lunar (revision 21942)
+++ var/lib/lunar/functions/build.lunar (working copy)
@@ -272,7 +272,7 @@
 default_post_build() {
   debug_msg "default_post_build ($@)"
 
-  if [ $(wc -l $INSTALLWATCHFILE | awk '{print$1}') == "0" ]; then
+  if [ $(wc -l $INSTALLWATCHFILE | awk '{print$1}') == "0" ] &&
[ "$PROFILE" != "yes" ] ; then message "${PROBLEM_COLOR}WARNING:
${DEFAULT_COLOR}${FILE_COLOR}BUILD${DEFAULT_COLOR}${PROBLEM_COLOR} does
not call prepare_install or installs zero files!${DEFAULT_COLOR}" fi 
Index: var/lib/lunar/functions/main.lunar
===================================================================
--- var/lib/lunar/functions/main.lunar  (revision 21942)
+++ var/lib/lunar/functions/main.lunar  (working copy)
@@ -343,7 +343,7 @@
     sound SUCCESS               &&
     activity_log  "lin"  "$MODULE"  "$VERSION"  "success"
 
-    if [ "$?" != 0 ] ; then
+    if [ "$?" != 0 ] && [ "$PROFILE" != "yes" ] ; then
       sound FAILURE
       message "${PROBLEM_COLOR}! Problem detected${DEFAULT_COLOR}"
       rm -f $linING
-------------- next part --------------
A non-text attachment was scrubbed...
Name: profile_patch
Type: application/octet-stream
Size: 1189 bytes
Desc: not available
Url : http://foo-projects.org/pipermail/lunar-dev/attachments/20061026/415b677d/profile_patch.obj


More information about the Lunar-dev mailing list