NetBSD Problem Report #10835

Received: (qmail 14262 invoked from network); 15 Aug 2000 03:03:58 -0000
Message-Id: <20000815030356.C74794CCE@yeah-baby.shagadelic.org>
Date: Mon, 14 Aug 2000 20:03:56 -0700 (PDT)
From: thorpej@shagadelic.org
Reply-To: thorpej@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: Package upgrade procedure sucks
X-Send-Pr-Version: 3.95

>Number:         10835
>Category:       pkg
>Synopsis:       Package upgrade procedure sucks
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          analyzed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 15 03:04:00 +0000 2000
>Closed-Date:    
>Last-Modified:  Tue Jul 16 01:58:01 +0000 2002
>Originator:     Jason R Thorpe
>Release:        1.5E and 1.5_ALPHA2 20000814
>Organization:
6th and Hugo Software
>Environment:
	NetBSD 1.5E on x86 and Alpha systems.  Doesn't matter,
	really.

>Description:
	The package upgrade procedure leaves a lot to be desired.

	When upgrading a package, you essentially need to delete
	a package and re-install it.  This means that if you
	want to upgrade a package that something else depends
	on without re-installing that something else, you have
	to screw with dependencies by doing "pkg_delete -f"
	to force removing the package so you can install the
	new one.

	Instead, we should:

		(1) Install new files over the old.

		(2) For files in the old packing list, and not
		    in the new packing list, delete these files.

		(3) Patch up any dependencies that need to be
		    patched up.

	Special care should be taken for (2) -- the PLIST should
	be able to specify "leave installed on upgrade", and a
	package should be able to be labeled as "upgraded" if
	these special PLIST entries exist, so that e.g. libfoo.1
	and libfoo.2 can be present on the system at the same time.

>How-To-Repeat:

>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: agc 
State-Changed-When: Tue Jul 9 13:34:08 PDT 2002 
State-Changed-Why:  
agc analyzed the PR. It only took 15 months, we're obviously getting 
there. Sorry about that. 

There are basically two sets of requests here: 
1. to provide a better way of upgrading packages, which I think we've 
addressed with the "replace" target in bsd.pkg.mk - it makes a copy 
of the currently-installed package via pkg_tarup, installs the new 
package, fixes up the +REQUIRED_BY file. If there is a problem, the 
procedure can be reversed by using the "undo-replace" target. 

2. to provide a facility whereby shared libs (primarily) can be 
retained, and the rest of the package deleted, so that old packages 
which use the shared lib can continue to function. I've made a package 
called pkg_retire which can do this, but found it to be of limited 
value, due to ELF's linking with the major version number of the shared 
lib. i.e. it only worked when the major number on the shared lib was 
bumped. The pkgsrc entry for pkg_retire is on the anonftp area of 
ftp.netbsd.org. 

From: Frederick Bruckman <fredb@immanent.net>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: Re: pkg/10835
Date: Mon, 15 Jul 2002 20:57:13 -0500 (CDT)

   2. to provide a facility whereby shared libs (primarily) can be
   retained, and the rest of the package deleted, so that old packages
   which use the shared lib can continue to function. I've made a package
   called pkg_retire which can do this, but found it to be of limited
   value, due to ELF's linking with the major version number of the shared
   lib. i.e. it only worked when the major number on the shared lib was
   bumped. The pkgsrc entry for pkg_retire is on the anonftp area of
   ftp.netbsd.org.

 "pkg_retire" doesn't allow you to have both the old and the new shared
 libraries installed *at* *the* *same* *time*, which is what's
 required to comply with the request. It's a non-trivial problem, which
 requires an extension to the package database. Please see:

     ftp://ftp.netbsd.org/pub/NetBSD/misc/fredb/pkg_hack.tar.gz

 I've been using this to track pkgsrc for months, even before I
 announced it in May of this year:

     http://mail-index.netbsd.org/tech-pkg/2002/05/16/0010.html

 It really works (given it's limitations -- must use gnu awk & "make
 {deinstall, install,package} must be done as root). Please take
 another look.

 Frederick

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.