Author: cperciva Date: Wed Oct 16 18:36:53 2013 New Revision: 256646 URL: http://svnweb.freebsd.org/changeset/base/256646
Log: When installing updates, install new directories first and remove old directories last. This is generally handled by the fact that the list of filesystem objects is sorted, but this sorting is broken by code which moves .so files ahead (so that they're present before any binaries which use them)... that code also moved .so files ahead of directories, which is a problem for upgrading to 10.0 where there's a new directory containing new .so files. Errata Notice Candidate. Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Wed Oct 16 18:20:27 2013 (r256645) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Wed Oct 16 18:36:53 2013 (r256646) @@ -2814,15 +2814,23 @@ Kernel updates have been installed. Ple # If we haven't already dealt with the world, deal with it. if ! [ -f $1/worlddone ]; then + # Create any necessary directories first + grep -vE '^/boot/' $1/INDEX-NEW | + grep -E '^[^|]+\|d\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + # Install new shared libraries next grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 # Deal with everything else grep -vE '^/boot/' $1/INDEX-OLD | + grep -vE '^[^|]+\|d\|' | grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 @@ -2868,11 +2876,20 @@ again to finish installing updates. # Remove old shared libraries grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW grep -vE '^/boot/' $1/INDEX-OLD | + grep -vE '^[^|]+\|d\|' | grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD install_delete INDEX-OLD INDEX-NEW || return 1 + # Remove old directories + grep -vE '^/boot/' $1/INDEX-OLD | + grep -E '^[^|]+\|d\|' > INDEX-OLD + grep -vE '^/boot/' $1/INDEX-OLD | + grep -E '^[^|]+\|d\|' > INDEX-OLD + install_delete INDEX-OLD INDEX-NEW || return 1 + # Remove temporary files rm INDEX-OLD INDEX-NEW } _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"