Subject: pkg/23583: pkg_delete doesn't strip pathsep from the name of deleted package
To: None <gnats-bugs@gnats.netbsd.org>
From: Michal Pasternak <dotz@irc.pl>
List: netbsd-bugs
Date: 11/27/2003 22:29:23
>Number: 23583
>Category: pkg
>Synopsis: pkg_delete doesn't strip pathsep from the name of deleted package
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Nov 27 22:31:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Michal Pasternak
>Release: NetBSD 1.6.1
>Organization:
Good People With Bad Reputation
>Environment:
System: NetBSD mainframe.w.lub.pl 1.6.1 NetBSD 1.6.1 (GENERIC) #0: Tue Apr 8 12:05:52 UTC 2003 autobuild@tgm.daemon.org:/autobuild/netbsd-1-6/i386/OBJ/autobuild/netbsd-1-6/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
I like to delete packages by doing "cd /var/db/pkg" before. Doing
so, I can easily use shell tab-completion capability to find the
name of the package I want to delete. Most shells will complete
a directory name including path separator at the end. Example:
$ cd /var/db/pkg
$ pkg_delete op[CTRL+D]
$ pkg_delete opera-7.23/
If I hit [return] at that point, the package will be deleted, but
it won't be erased from +REQUIRED_BY files in dependent packages.
>How-To-Repeat:
See above.
>Fix:
in pkg_install check if last character of the name of the package
is path separator and if it is, change it to '0' byte.
>Release-Note:
>Audit-Trail:
>Unformatted: