From wollman@hergotha.csail.mit.edu  Sun Jul  7 05:11:00 2013
Return-Path: <wollman@hergotha.csail.mit.edu>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 0D3F9A82
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Jul 2013 05:11:00 +0000 (UTC)
	(envelope-from wollman@hergotha.csail.mit.edu)
Received: from hergotha.csail.mit.edu (wollman-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:ccb::2])
	by mx1.freebsd.org (Postfix) with ESMTP id C37B51135
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Jul 2013 05:10:59 +0000 (UTC)
Received: from hergotha.csail.mit.edu (localhost [127.0.0.1])
	by hergotha.csail.mit.edu (8.14.5/8.14.5) with ESMTP id r675Awjk089977
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 7 Jul 2013 01:10:58 -0400 (EDT)
	(envelope-from wollman@hergotha.csail.mit.edu)
Received: (from wollman@localhost)
	by hergotha.csail.mit.edu (8.14.5/8.14.4/Submit) id r675AwqF089976;
	Sun, 7 Jul 2013 01:10:58 -0400 (EDT)
	(envelope-from wollman)
Message-Id: <201307070510.r675AwqF089976@hergotha.csail.mit.edu>
Date: Sun, 7 Jul 2013 01:10:58 -0400 (EDT)
From: Garrett Wollman <wollman@bimajority.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: pkg upgrade is much too aggressive
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         180358
>Category:       ports
>Synopsis:       ports-mgmt/pkg: pkg upgrade is much too aggressive
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 07 05:20:00 UTC 2013
>Closed-Date:    Sun Jul 07 07:50:31 CDT 2013
>Last-Modified:  Sun Jul  7 13:30:00 UTC 2013
>Originator:     Garrett Wollman
>Release:        FreeBSD 9.1-RELEASE-p3 amd64
>Organization:
none
>Environment:
System: FreeBSD hergotha.csail.mit.edu 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #6 r250951: Thu May 23 23:38:53 EDT 2013 wollman@hergotha.csail.mit.edu:/usr/obj/usr/src/sys/HERGOTHA amd64

pkg 1.1.4

>Description:

I rebuilt my package repository (just the repository database, not the
packages), and "pkg upgrade" insisted on reinstalling *every single
package* on the client system, giving as a reason "needed shared
library changed".  This is clearly wrong, since I was already running
*the exact same code*.

Even before this, the upgrade command was far too aggressive,
reinstalling dozens of packages unnecessarily after a minor
(same-version) update to a library dependency.  Upgrades should only
be forced automatically if the *version* of the shared library
changes, not for any old package change; that's why shared libraries
have versions in the first place.

>How-To-Repeat:

rm $REPO/*.txz
pkg repo $REPO $SIGNING_KEY

pkg upgrade

>Fix:

Make "pkg upgrade" less agreesive unless some new 'force flag is
specified.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Jul 7 09:49:09 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=180358 
State-Changed-From-To: open->closed 
State-Changed-By: bdrewery 
State-Changed-When: Sun Jul 7 07:50:31 CDT 2013 
State-Changed-Why:  
This is working as intended. Note the commit message for 1.1.4: 'Fix 
backwards compatibility for 1.0-built packages for tracking shlibs'. The 
issue was a regression in 1.1.0 in that the packages no longer 
advertised which shlibs they required, now with 1.1.4 the manifests 
contain the actual shlibs. It's a one-time issue. The shlib tracking 
does compare versions, and then reinstalls based on that to avoid 
needing manual intervention with pkg install -R. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=180358 

From: Bryan Drewery <bdrewery@FreeBSD.org>
To: bug-followup@FreeBSD.org, wollman@bimajority.org
Cc:  
Subject: Re: ports/180358: ports-mgmt/pkg: pkg upgrade is much too aggressive
Date: Sun, 07 Jul 2013 08:23:48 -0500

 You can also run 'pkg check -Ba' once to help avoid reinstalling everything.
>Unformatted:
