Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/pkg_install/create Pull up revision 1.22 (requ...
details: https://anonhg.NetBSD.org/src/rev/c3bd07d377b1
branches: netbsd-1-5
changeset: 492819:c3bd07d377b1
user: he <he%NetBSD.org@localhost>
date: Sat Feb 23 16:41:28 2002 +0000
description:
Pull up revision 1.22 (requested by hubertf):
Make @cwd work a bit more reliable, e.g. when -L is used.
diffstat:
usr.sbin/pkg_install/create/pl.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 68383f496679 -r c3bd07d377b1 usr.sbin/pkg_install/create/pl.c
--- a/usr.sbin/pkg_install/create/pl.c Sat Feb 23 16:06:20 2002 +0000
+++ b/usr.sbin/pkg_install/create/pl.c Sat Feb 23 16:41:28 2002 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: pl.c,v 1.18.4.1 2000/07/05 20:39:33 hubertf Exp $ */
+/* $NetBSD: pl.c,v 1.18.4.2 2002/02/23 16:41:28 he Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: pl.c,v 1.11 1997/10/08 07:46:35 charnier Exp";
#else
-__RCSID("$NetBSD: pl.c,v 1.18.4.1 2000/07/05 20:39:33 hubertf Exp $");
+__RCSID("$NetBSD: pl.c,v 1.18.4.2 2002/02/23 16:41:28 he Exp $");
#endif
#endif
@@ -166,7 +166,14 @@
}
}
- (void) snprintf(name, sizeof(name), "%s/%s", srcdir ? srcdir : cwd, p->name);
+ if (cwd == home) {
+ /* no @cwd yet */
+ (void) snprintf(name, sizeof(name), "%s/%s", srcdir ? srcdir : cwd, p->name);
+ } else {
+ /* after @cwd */
+ /* prepend DESTDIR if set? - HF */
+ (void) snprintf(name, sizeof(name), "%s/%s", cwd, p->name);
+ }
if (lstat(name, &st) < 0) {
warnx("can't stat `%s'", name);
continue;
Home |
Main Index |
Thread Index |
Old Index