Subject: pkg/10835: Package upgrade procedure sucks
To: None <gnats-bugs@gnats.netbsd.org>
From: None <thorpej@shagadelic.org>
List: netbsd-bugs
Date: 08/14/2000 20:03:16
>Number:         10835
>Category:       pkg
>Synopsis:       Package upgrade procedure sucks
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 14 20:04:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jason R Thorpe
>Release:        Aug 14, NetBSD-1.5E and 1.5_ALPHA2
>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:
>Unformatted: