From owner-svn-src-all@FreeBSD.ORG Thu Oct 24 03:36:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 677A4D1B; Thu, 24 Oct 2013 03:36:40 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 45F562579; Thu, 24 Oct 2013 03:36:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9O3aeSj082189; Thu, 24 Oct 2013 03:36:40 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9O3aeuW082188; Thu, 24 Oct 2013 03:36:40 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201310240336.r9O3aeuW082188@svn.freebsd.org> From: Colin Percival Date: Thu, 24 Oct 2013 03:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257038 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 03:36:40 -0000 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