pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/35523: pkg_delete
Note: There was a bad value `' for the field `Class'.
It was set to the default value of `sw-bug'.
Note: There was a bad value `' for the field `Priority'.
It was set to the default value of `medium'.
Note: There was a bad value `' for the field `Severity'.
It was set to the default value of `serious'.
Note: There was a bad value `' for the field `Confidential'.
It was set to the default value of `yes'.
>Number: 35523
>Category: pkg
>Synopsis: pkg_delete
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 30 18:30:00 +0000 2007
>Originator: Greg Troxel
>Release: NetBSD 3.99.24
>Organization:
>Environment:
System: NetBSD acert-netbsd.ir.bbn.com 3.99.24 NetBSD 3.99.24 (XEN2_DOMU) #0:
Wed Aug 23 14:06:28 EDT 2006
gdt%adroit-netbsd.ir.bbn.com@localhost:/home/n0/obj/gdt-current/i386/sys/arch/i386/compile/XEN2_DOMU
i386
Architecture: i386
Machine: i386
/usr/sbin/pkg_delete:
$NetBSD: crt0.c,v 1.15 2006/05/17 17:01:12 christos Exp $
$NetBSD: main.c,v 1.35 2005/11/05 13:11:02 wiz Exp $
$NetBSD: perform.c,v 1.16 2005/05/30 13:23:31 wiz Exp $
$NetBSD: version.c,v 1.4 2003/09/23 07:13:54 grant Exp $
$NetBSD: plist.c,v 1.13 2005/01/07 11:58:12 agc Exp $
$NetBSD: global.c,v 1.4 2003/09/23 07:13:53 grant Exp $
$NetBSD: str.c,v 1.61 2006/03/17 17:46:44 hubertf Exp $
$NetBSD: pkgdb.c,v 1.25 2006/01/04 23:33:23 christos Exp $
$NetBSD: file.c,v 1.77 2006/03/26 18:11:22 christos Exp $
$NetBSD: pen.c,v 1.35 2005/11/05 13:11:02 wiz Exp $
$NetBSD: fexec.c,v 1.9 2005/11/23 04:59:14 ben Exp $
$NetBSD: path.c,v 1.6 2004/12/29 12:16:56 agc Exp $
$NetBSD: ftpio.c,v 1.72 2006/04/18 13:11:05 hubertf Exp $
>Description:
pkg_delete can fail to remove dependency lines.
>How-To-Repeat:
When removing a package, if one does
pkg_delete xfig-3.2.5alpha5nb4/
(note the trailing /), then packages that xfig depended on will still
have xfig in the +REQUIRED_BY file.
The following script may be helpful in cleaning up from this problem.
----------------------------------------
#!/bin/sh
cd /var/db/pkg
cat */+REQUIRED_BY | sort -u |
while read f; do
if [ ! -d $f ]; then
echo $f;
fi;
done |
while read bad; do
for d in */+REQUIRED_BY; do
if egrep $bad $d > /dev/null; then
echo "REMOVING SPURIOUS $bad from $d"
ed $d << FOO
g/$bad/d
w
FOO
fi
done;
done
find . -name +REQUIRED_BY -size 0|xargs rm
echo "LEAF PACKAGES"
for i in *; do if [ ! -f $i/+REQUIRED_BY ]; then echo $i; fi; done
----------------------------------------
>Fix:
Probably pkg_delete should trim trailing /. It's convenient to use
shell completion to delete packages when in /var/db/pkg.
>Unformatted:
no
pkg_delete fails to remove dependencies if package has trailing /
serious
low
sw-bug
Home |
Main Index |
Thread Index |
Old Index