Author: pierre
Date: Thu Jul  9 10:02:10 2020
New Revision: 4192

Log:
Prevent overwriting /var/run and lock symlinks with PM

/var/run and /var/lock are created as symlinks in creatingdirs. But
if a package install something into those dirs (with DESTDIR install),
they get overwritten with true directories if using a package
manager. Note that without PM, anything installed into those dirs
is lost at next reboot. So remove those dirs before packaging.

Modified:
   jhalfs/trunk/LFS/lfs.xsl

Modified: jhalfs/trunk/LFS/lfs.xsl
==============================================================================
--- jhalfs/trunk/LFS/lfs.xsl    Thu Jul  9 09:59:36 2020        (r4191)
+++ jhalfs/trunk/LFS/lfs.xsl    Thu Jul  9 10:02:10 2020        (r4192)
@@ -311,6 +311,12 @@
 done
 [ -d $PKG_DEST/lib64 ] && [ -z "$(ls $PKG_DEST/lib64)" ] &&
   rmdir -v $PKG_DEST/lib64
+<!-- prevent overwriting symlinks: if a package install something in
+     these directories, it'll be lost if not using package management,
+     since they are symlinks to tmpfs. So, remove it too if using PM. -->
+rm -rf $PKG_DEST/var/{run,lock}
+<!-- Remove /var if it is empty, then -->
+[ -d $PKG_DEST/var ] &amp;&amp; [ -z "$(ls $PKG_DEST/var)" ] &amp;&amp; rmdir 
-v $PKG_DEST/var
 PREV_SEC=${SECONDS}
 packInstall
 SECONDS=${PREV_SEC}
-- 
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page

Reply via email to