Subject: pkg/24255: pkg_delete removes meta data even if deinstall fails
To: None <gnats-bugs@gnats.netbsd.org>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 01/26/2004 22:32:13
>Number:         24255
>Category:       pkg
>Synopsis:       pkg_delete removes meta data even if deinstall fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 26 22:33:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Christian Biere
>Release:        NetBSD 1.6ZH
>Organization:
>Environment:
System: NetBSD cyclonus 1.6ZH NetBSD 1.6ZH (STARSCREAM) #2: Sun Jan 25 22:37:39 CET 2004 bin@cyclonus:/usr/build/src/sys/arch/i386/compile/STARSCREAM i386
>Description:

pkg_delete deletes all meta data /var/db/pkg/PACKAGE for a package even if
the directories/files couldn't be deleted due to missing permissions, a
read-only mounted partition etc, wrong moon-phase etc. This can result in a
lot of orphaned files under /usr/pkg.

Instead pkg_delete should bail out or at least ask how to procede if some of
the deinstallation procedures fail.

>How-To-Repeat:

$ find /usr/pkg -type f -print0|xargs -0 chflags -h uchg # paranoia
$ pkg_delete PACKAGE

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: