diff options
author | wiz <wiz@pkgsrc.org> | 2006-04-04 06:25:59 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2006-04-04 06:25:59 +0000 |
commit | 3774c1a14d36055a7589c6d1e32393fb50f09488 (patch) | |
tree | f019305a94c392a2d562d6e7f045ba0b40d5b194 /pkgtools/pkg_install | |
parent | 864c7d4c3358bc371b5c588285f7f2415a386bab (diff) | |
download | pkgsrc-3774c1a14d36055a7589c6d1e32393fb50f09488.tar.gz |
Pull over v1.51 from src/usr.sbin:
revision 1.51
date: 2006/03/06 20:00:10; author: reed; state: Exp; lines: +4 -4
Fix the "Cannot chdir" error message to actually show the
problem directory name for lsbest and lsall.
For example:
# pkg_admin -d /usr/packages/DragonFly/1.4.0/i386/All lsbest 'gmake>0'
pkg_admin: Cannot chdir to /var/db/pkg: No such file or directory
Should show:
pkg_admin: Cannot chdir to /usr/packages/DragonFly/1.4.0/i386/All: No such file or directory
Diffstat (limited to 'pkgtools/pkg_install')
-rw-r--r-- | pkgtools/pkg_install/files/admin/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgtools/pkg_install/files/admin/main.c b/pkgtools/pkg_install/files/admin/main.c index e552edd6d37..696070f64cf 100644 --- a/pkgtools/pkg_install/files/admin/main.c +++ b/pkgtools/pkg_install/files/admin/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.19 2005/11/05 13:20:09 wiz Exp $ */ +/* $NetBSD: main.c,v 1.20 2006/04/04 06:25:59 wiz Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -8,7 +8,7 @@ #include <sys/cdefs.h> #endif #ifndef lint -__RCSID("$NetBSD: main.c,v 1.19 2005/11/05 13:20:09 wiz Exp $"); +__RCSID("$NetBSD: main.c,v 1.20 2006/04/04 06:25:59 wiz Exp $"); #endif /* @@ -617,7 +617,7 @@ main(int argc, char *argv[]) fchdir(saved_wd); rc = chdir(dir); if (rc == -1) - err(EXIT_FAILURE, "Cannot chdir to %s", _pkgdb_getPKGDB_DIR()); + err(EXIT_FAILURE, "Cannot chdir to %s", dir); if (getcwd(cwd, sizeof(cwd)) == NULL) err(EXIT_FAILURE, "getcwd"); @@ -660,7 +660,7 @@ main(int argc, char *argv[]) fchdir(saved_wd); rc = chdir(dir); if (rc == -1) - err(EXIT_FAILURE, "Cannot chdir to %s", _pkgdb_getPKGDB_DIR()); + err(EXIT_FAILURE, "Cannot chdir to %s", dir); if (getcwd(cwd, sizeof(cwd)) == NULL) err(EXIT_FAILURE, "getcwd"); |