Subject: pkg/18384: pkg_delete does not completely remove packages
To: None <>
From: None <>
List: netbsd-bugs
Date: 09/24/2002 13:29:55
>Number:         18384
>Category:       pkg
>Synopsis:       pkg_delete does not completely remove packages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 23 00:31:00 PDT 2002
>Originator:     grant beattie
>Release:        NetBSD 1.6H
System: NetBSD mofo 1.6H NetBSD 1.6H (MOFO.PROF) #0: Thu Sep 19 00:54:25 EST 2002 grant@mofo:/raid0/netbsd/current/src/sys/arch/i386/compile/MOFO.PROF i386
Architecture: i386
Machine: i386
if pkg_delete is invoked while sitting in a directory that it will
remove, it doesn't completely remove the package.

This was found by doing the following:
# cd /etc/pkg/rc.d
# pkg_delete openssh
[stuff deleted]
pkg_delete: Toto! This doesn't look like Kansas anymore!
# pkg_info -e openssh

as 'sshd' was the only file in /etc/pkg/rc.d, the directory was

see above.
workaround is to run pkg_delete again and ignore the warnings. real
fix is to make pkg_delete correctly and completely remove the package,
regardless of whether the cwd will be deleted or not (it doesn't
matter to most shells, and shouldn't matter to pkg_delete).