Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2013 03:36:40 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r257038 - head/usr.sbin/freebsd-update
Message-ID:  <201310240336.r9O3aeuW082188@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Thu Oct 24 03:36:39 2013
New Revision: 257038
URL: http://svnweb.freebsd.org/changeset/base/257038

Log:
  Be more selective when filtering for lib*.so.N files.  These are deleted
  at the end of the upgrade process, after warning users to upgrade any
  3rd party software (e.g., from the ports tree) which might link to the
  libraries being removed.
  
  Prior to this commit, the line
    /usr/lib/libc.so|...|/lib/libc.so.7
  matched the regex, which -- upgrading from 9.x to 10.x, where libc.so is
  a regular file and thus was not part of a line which matched the regex --
  resulted in freebsd-update thinking that /usr/lib/libc.so was a shared
  library which was being removed as part of the upgrade.  This had some
  unfortunate consequences.
  
  This will be part of an upcoming Errata Notice.

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	Thu Oct 24 02:39:07 2013	(r257037)
+++ head/usr.sbin/freebsd-update/freebsd-update.sh	Thu Oct 24 03:36:39 2013	(r257038)
@@ -2822,16 +2822,16 @@ Kernel updates have been installed.  Ple
 		# Install new shared libraries next
 		grep -vE '^/boot/' $1/INDEX-NEW |
 		    grep -vE '^[^|]+\|d\|' |
-		    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 '^[^|]+\|d\|' |
-		    grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD
+		    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
+		    grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 		install_from_index INDEX-NEW || return 1
 		install_delete INDEX-OLD INDEX-NEW || return 1
 
@@ -2852,11 +2852,11 @@ Kernel updates have been installed.  Ple
 
 		# 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 |
@@ -2877,10 +2877,10 @@ 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 -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 	grep -vE '^/boot/' $1/INDEX-OLD |
 	    grep -vE '^[^|]+\|d\|' |
-	    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 old directories



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310240336.r9O3aeuW082188>