Subject: pkg/5360: it's impossible to extract any pkg
To: None <gnats-bugs@gnats.netbsd.org>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: netbsd-bugs
Date: 04/25/1998 11:06:50
>Number: 5360
>Category: pkg
>Synopsis: it's impossible to extract any pkg
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 25 02:20:01 1998
>Last-Modified:
>Originator: Jaromir Dolecek
>Organization:
ICS MU
>Release: 1.3.1
>Environment:
System: NetBSD saruman.ics.muni.cz 1.3.1 NetBSD 1.3.1 (SARUMAN) #0: Sun Apr 19 16:15:24 MEST 1998 dolecek@saruman.ics.muni.cz:/usr/home/dolecek/N131/usr/src/sys/arch/i386/compile/SARUMAN i386
>Description:
Just before extracting downloaded distfile, current directory is
changed to ${WRKDIR}, making (under NetBSD relative)
${_DISTDIR} invalid.
Strange is that compiling goes normally on even through
${EXTRACT_CMD} hasn't succeed; the compiling stops not until
patches are tried to be applied.
>How-To-Repeat:
cd /usr/pkgsrc/some_dir/some_pkg
make extract
>Fix:
The simpliest solution is to prepend name of original
working directory before ${_DISTDIR}.
--- bsd.pkg.mk.orig Fri Apr 24 03:24:00 1998
+++ bsd.pkg.mk Sat Apr 25 10:45:23 1998
@@ -1137,7 +1137,7 @@
.endif
.endif
@for file in ${EXTRACT_ONLY}; do \
- if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
+ if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${.CURDIR}/${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
then \
exit 1; \
fi \
>Audit-Trail:
>Unformatted: