diff options
author | cperciva <cperciva@FreeBSD.org> | 2008-03-25 11:31:16 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2008-03-25 11:31:16 +0000 |
commit | e212b28cc6ee26e864b6342ab5858510c28de531 (patch) | |
tree | 5b4da64bd06220a8922e6407c7a2c6204fbca661 /usr.sbin | |
parent | e2f2131976c50e61068074f9b8e58763dfa61d8b (diff) | |
download | FreeBSD-src-e212b28cc6ee26e864b6342ab5858510c28de531.zip FreeBSD-src-e212b28cc6ee26e864b6342ab5858510c28de531.tar.gz |
Adjust recognize-shared-libraries regex to avoid matching symlinks to
shared libraries.
This fixes a problem which resulted in 6.x->7.x upgrades having the
/usr/lib/libpthread.so -> libthr.so symlink missing; what happened was
that the old libpthread.so symlink pointed to /lib/libpthread.so.2 --
which matched the "/lib/*\.so\.[0-9]+" regex -- but the new symlink
didn't, so FreeBSD Update got confused and deleted the symlink as part
of its "remove old shared libraries" step.
To recreate the symlink (which I understand is necessary for ports like
KDE to build) on a 7.x system which FreeBSD Update upgraded from 6.x:
# ln -s libthr.so /usr/lib/libpthread.so
Reported by: Dmitry RCL Rekman
Help diagnosing bug from: kris
MFC after: 7 days
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/freebsd-update/freebsd-update.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index f3ecf1f..716051f 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2511,14 +2511,14 @@ Kernel updates have been installed. Please reboot and run if ! [ -f $1/worlddone ]; then # Install new shared libraries next grep -vE '^/boot/' $1/INDEX-NEW | - grep -E '/lib/.*\.so\.[0-9]+' > INDEX-NEW + 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 '/lib/.*\.so\.[0-9]+' > INDEX-OLD + grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | - grep -vE '/lib/.*\.so\.[0-9]+' > INDEX-NEW + grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 @@ -2539,11 +2539,11 @@ Kernel updates have been installed. Please reboot and run # Do we need to ask the user to portupgrade now? grep -vE '^/boot/' $1/INDEX-NEW | - grep -E '/lib/.*\.so\.[0-9]+' | + grep -E '/lib/.*\.so\.[0-9]+\|' | cut -f 1 -d '|' | sort > newfiles if grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '/lib/.*\.so\.[0-9]+' | + grep -E '/lib/.*\.so\.[0-9]+\|' | cut -f 1 -d '|' | sort | join -v 1 - newfiles | @@ -2563,9 +2563,9 @@ again to finish installing updates. # Remove old shared libraries grep -vE '^/boot/' $1/INDEX-NEW | - grep -E '/lib/.*\.so\.[0-9]+' > INDEX-NEW + grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '/lib/.*\.so\.[0-9]+' > INDEX-OLD + grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD install_delete INDEX-OLD INDEX-NEW || return 1 # Remove temporary files @@ -2631,35 +2631,35 @@ rollback_files () { # Install old shared library files which don't have the same path as # a new shared library file. grep -vE '^/boot/' $1/INDEX-NEW | - grep -E '/lib/.*\.so\.[0-9]+' | + grep -E '/lib/.*\.so\.[0-9]+\|' | cut -f 1 -d '|' | sort > INDEX-NEW.libs.flist grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '/lib/.*\.so\.[0-9]+' | + grep -E '/lib/.*\.so\.[0-9]+\|' | sort -k 1,1 -t '|' - | join -t '|' -v 1 - INDEX-NEW.libs.flist > INDEX-OLD install_from_index INDEX-OLD || return 1 # Deal with files which are neither kernel nor shared library grep -vE '^/boot/' $1/INDEX-OLD | - grep -vE '/lib/.*\.so\.[0-9]+' > INDEX-OLD + grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | - grep -vE '/lib/.*\.so\.[0-9]+' > INDEX-NEW + grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-OLD || return 1 install_delete INDEX-NEW INDEX-OLD || return 1 # Install any old shared library files which we didn't install above. grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '/lib/.*\.so\.[0-9]+' | + grep -E '/lib/.*\.so\.[0-9]+\|' | sort -k 1,1 -t '|' - | join -t '|' - INDEX-NEW.libs.flist > INDEX-OLD install_from_index INDEX-OLD || return 1 # Delete unneeded shared library files grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '/lib/.*\.so\.[0-9]+' > INDEX-OLD + grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | - grep -E '/lib/.*\.so\.[0-9]+' > INDEX-NEW + grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW install_delete INDEX-NEW INDEX-OLD || return 1 # Deal with kernel files |