diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2013-10-16 18:36:53 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2013-10-16 18:36:53 +0000 |
commit | cd1ab2280c9af3fc91eece6eb1be30336a36a025 (patch) | |
tree | bd09883dc7df7afda5006e585bb6312f292315db /usr.sbin/freebsd-update | |
parent | 49cc03da31d268e60807527936612bb5f43e03d0 (diff) | |
download | src-cd1ab2280c9af3fc91eece6eb1be30336a36a025.tar.gz src-cd1ab2280c9af3fc91eece6eb1be30336a36a025.zip |
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.
Notes
Notes:
svn path=/head/; revision=256646
Diffstat (limited to 'usr.sbin/freebsd-update')
-rw-r--r-- | usr.sbin/freebsd-update/freebsd-update.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index ef63c0cfbe34..49db090aaa8f 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2814,15 +2814,23 @@ Kernel updates have been installed. Please reboot and run # 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 } |