[PC-BSD Commits] r17219 - pcbsd/current/src-sh/pc-updatemanager/scripts

svn at pcbsd.org svn at pcbsd.org
Wed Jun 6 17:18:36 PDT 2012


Author: kris
Date: 2012-06-07 00:18:34 +0000 (Thu, 07 Jun 2012)
New Revision: 17219

Modified:
   pcbsd/current/src-sh/pc-updatemanager/scripts/mu-stage1
Log:

Fix a major bug doing system updates due to some files still needing noschg set on them



Modified: pcbsd/current/src-sh/pc-updatemanager/scripts/mu-stage1
===================================================================
--- pcbsd/current/src-sh/pc-updatemanager/scripts/mu-stage1	2012-06-06 21:36:13 UTC (rev 17218)
+++ pcbsd/current/src-sh/pc-updatemanager/scripts/mu-stage1	2012-06-07 00:18:34 UTC (rev 17219)
@@ -38,10 +38,6 @@
 rm /tmp/.pkg-remove.$$
 echo ""
 
-# Start extracting the updated world now
-echo -e "Extracting updated world environment...\c"
-cd /
-
 # Remove the old meta-pkg data, keeping the old indexes
 pkgSets="pcbsd warden"
 for mPkgSet in $pkgSets
@@ -56,16 +52,7 @@
   fi
 done
 
-# Exclude ./boot in extract will do after world is done
-echo "./boot" >> ${STAGEDIR}/xtra-data/upgrade-excludes
 
-tar xvpf ${STAGEDIR}/PCBSD.txz -X ${STAGEDIR}/xtra-data/upgrade-excludes >/dev/null 2>/dev/null
-if [ $? -eq 0 ] ; then
-  echo "DONE"
-else
-  echo "DONE!"
-fi
-
 # Start extracting the boot
 echo -e "Extracting kernel and boot environment...\c"
 cd /
@@ -99,6 +86,27 @@
 # Cleanup the boot tmp files
 rm -rf /.boot-tmp
 
+# Start extracting the updated world now
+echo -e "Extracting updated world environment...\c"
+cd /
+
+# Need to set noschg on some directories / files
+chDirs="/bin /lib /libexec /sbin /usr/bin /usr/lib /usr/lib32 /usr/sbin /var"
+for cDir in $chDirs
+do
+  chflags -R noschg ${cDir}/* 
+done
+
+# Exclude ./boot in extract, already done
+echo "./boot" >> ${STAGEDIR}/xtra-data/upgrade-excludes
+
+tar xvpf ${STAGEDIR}/PCBSD.txz -X ${STAGEDIR}/xtra-data/upgrade-excludes >/dev/null 2>/dev/null
+if [ $? -eq 0 ] ; then
+  echo "DONE"
+else
+  echo "DONE!"
+fi
+
 # Remove deleted files
 cd /
 oList="${STAGEDIR}/xtra-data/system-file.list.old"



More information about the Commits mailing list