Subject: pkg/6056: pkg_add fails if /usr/pkg is a link
To: None <gnats-bugs@gnats.netbsd.org>
From: Rene Hexel <rh@idle.trapdoor.vip.at>
List: netbsd-bugs
Date: 08/27/1998 18:07:20
>Number: 6056
>Category: pkg
>Synopsis: pkg_add fails if /usr/pkg is a symbolic link
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 27 09:20:01 1998
>Last-Modified:
>Originator: Rene Hexel
>Organization:
>Release: NetBSD 1.3.2 and NetBSD 1.3F (i386/snap-980723)
>Environment:
System: NetBSD idle 1.3.2 NetBSD 1.3.2 (IDLE) #34: Sun Aug 23 16:29:39 CEST 1998 rh@idle:/usr/local/sys/src/sys/arch/i386/compile/IDLE i386
>Description:
If pkg_add is started for the first time, when the /usr/pkg
directory structure does not exist yet, it fails miserably if /usr/pkg
is actually a link somewhere else. What's worse: there is no error message
(the Exit 1 return code is the only error indication).
>How-To-Repeat:
Move your /usr/pkg directory aside, then try the following
example:
mkdir /opt/pkg
ln -s /opt/pkg /usr
pkg_add <any_binary_package>
Exit 1
>Fix:
Create the apropriate directory structure, even if /usr/pkg links
somewhere else. If that behaviour is not desired, at least display some
descriptive error message.
>Audit-Trail:
>Unformatted: