r3939 - jhalfs/branches/new_features/common/libs

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Sat Mar 25 14:02:19 PDT 2017


Author: pierre
Date: Sat Mar 25 14:02:19 2017
New Revision: 3939

Log:
Merge trunk r3938:
Existence of package management files is tested even if PKGMNGT=n. Fix that.
Thanks to Michael D.L. for reporting

Modified:
   jhalfs/branches/new_features/common/libs/func_validate_configs.sh

Modified: jhalfs/branches/new_features/common/libs/func_validate_configs.sh
==============================================================================
--- jhalfs/branches/new_features/common/libs/func_validate_configs.sh	Sat Mar 25 14:00:16 2017	(r3938)
+++ jhalfs/branches/new_features/common/libs/func_validate_configs.sh	Sat Mar 25 14:02:19 2017	(r3939)
@@ -202,25 +202,27 @@
                  ;;
 
         # Case of PKGMNGT: two files, packageManager.xml and packInstall.sh
-        # must exist in $PKGMNGTDIR:
+        # must exist in $PKGMNGTDIR if PKGMNGT='y':
       PKGMNGT) echo -e "`eval echo $PARAM_VALS`"
-               if [ ! -e "$PKGMNGTDIR/packageManager.xml" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packageManager.xml does not exist
-               fi
-               if [ ! -e "$PKGMNGTDIR/packInstall.sh" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packInstall.sh does not exist
-               fi
-               if [ ! -s "$PKGMNGTDIR/packageManager.xml" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packageManager.xml has zero size
-               fi
-               if [ ! -s "$PKGMNGTDIR/packInstall.sh" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packInstall.sh has zero size
-               fi
-               if [ ! -r "$PKGMNGTDIR/packageManager.xml" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packageManager.xml is not readable
-               fi
-               if [ ! -r "$PKGMNGTDIR/packInstall.sh" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packInstall.sh is not readable
+               if [ "$PKGMNGT" = y ]; then
+                 if [ ! -e "$PKGMNGTDIR/packageManager.xml" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packageManager.xml does not exist
+                 fi
+                 if [ ! -e "$PKGMNGTDIR/packInstall.sh" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packInstall.sh does not exist
+                 fi
+                 if [ ! -s "$PKGMNGTDIR/packageManager.xml" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packageManager.xml has zero size
+                 fi
+                 if [ ! -s "$PKGMNGTDIR/packInstall.sh" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packInstall.sh has zero size
+                 fi
+                 if [ ! -r "$PKGMNGTDIR/packageManager.xml" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packageManager.xml is not readable
+                 fi
+                 if [ ! -r "$PKGMNGTDIR/packInstall.sh" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packInstall.sh is not readable
+                 fi
                fi
                ;;
       # Display non-validated envars found in ${PROGNAME}_PARAM_LIST


More information about the alfs-log mailing list