Subject: pkg/28310: pkg_delete unable to delete multiple packages with dependencies
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
List: pkgsrc-bugs
Date: 11/14/2004 07:52:01
>Number:         28310
>Category:       pkg
>Synopsis:       pkg_delete unable to delete multiple packages with dependencies
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 14 07:52:00 +0000 2004
>Originator:     Pavel Cahyna
>Release:        NetBSD 2.0_BETA i386
>Organization:
>Environment:


System: NetBSD 2.0_BETA (GENERIC_DIAGNOSTIC s patchem D. Reeda - PR#26839) #4: Wed Oct  6 10:13:10 CEST 2004
	pavel@pc.martani.n2.repy.czf:/mnt/obj/kompilace/jadra/compile/GENERIC_DIAGNOSTIC



>Description:


when attempting to delete several packages when one depends on another, the package depended on can't be deleted. This seems to be independent on the ordering of package names on command line.


>How-To-Repeat:


(nas depends on p5-perl-headers)
pavel@pc:~$ pkg_delete -n p5-perl-headers-2.0_BETA nas
pkg_delete: package `p5-perl-headers-2.0_BETA' is required by other packages:
        nas-1.6nb3
Would execute de-install script at this point (arg: DEINSTALL).
Attempting to delete package `nas-1.6nb3'
Attempting to remove dependency on package `p5-perl-headers-2.0_BETA'
Would execute post-de-install script at this point (arg: POST-DEINSTALL).
pkg_delete: 1 package deletion(s) failed

pavel@pc:~$ pkg_delete -n nas p5-perl-headers-2.0_BETA 
pkg_delete: package `p5-perl-headers-2.0_BETA' is required by other packages:
        nas-1.6nb3
Would execute de-install script at this point (arg: DEINSTALL).
Attempting to delete package `nas-1.6nb3'
Attempting to remove dependency on package `p5-perl-headers-2.0_BETA'
Would execute post-de-install script at this point (arg: POST-DEINSTALL).
pkg_delete: 1 package deletion(s) failed


>Fix: