diff options
author | grant <grant@pkgsrc.org> | 2003-04-17 14:00:55 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2003-04-17 14:00:55 +0000 |
commit | 77ab9139498c5f01fd318a1be906598b55be8585 (patch) | |
tree | 76b3fd443d69b0e661175ee666836fd5500b9251 /pkgtools | |
parent | 1d4e7078a595ec43b45ac57e29abf4798fb33b3c (diff) | |
download | pkgsrc-77ab9139498c5f01fd318a1be906598b55be8585.tar.gz |
sync with bootstrap and -current:
- pkg_admin getcwd() fix.
- pkg_delete checksum mismatch warning.
- crank PKGTOOLS_VERSION.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/admin/main.c | 18 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/plist.c | 10 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/version.h | 4 |
3 files changed, 15 insertions, 17 deletions
diff --git a/pkgtools/pkg_install/files/admin/main.c b/pkgtools/pkg_install/files/admin/main.c index 559eb19d4ae..504bec83dd3 100644 --- a/pkgtools/pkg_install/files/admin/main.c +++ b/pkgtools/pkg_install/files/admin/main.c @@ -1,9 +1,9 @@ -/* $NetBSD: main.c,v 1.7 2003/03/29 18:41:56 jschauma Exp $ */ +/* $NetBSD: main.c,v 1.8 2003/04/17 14:00:55 grant Exp $ */ #if 0 #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: main.c,v 1.7 2003/03/29 18:41:56 jschauma Exp $"); +__RCSID("$NetBSD: main.c,v 1.8 2003/04/17 14:00:55 grant Exp $"); #endif #endif @@ -473,7 +473,7 @@ main(int argc, char *argv[]) /* args specified */ int rc; const char *basep, *dir; - char *cwd; + char cwd[MAXPATHLEN]; char base[FILENAME_MAX]; dir = dirname_of(*argv); @@ -485,12 +485,12 @@ main(int argc, char *argv[]) if (rc == -1) err(EXIT_FAILURE, "Cannot chdir to %s", _pkgdb_getPKGDB_DIR()); - cwd = getcwd(NULL, 0); + if (getcwd(cwd, sizeof(cwd)) == NULL) + err(EXIT_FAILURE, "getcwd"); if (findmatchingname(cwd, base, lspattern_fn, cwd) == -1) errx(EXIT_FAILURE, "Error in findmatchingname(\"%s\", \"%s\", ...)", cwd, base); - free(cwd); - + argv++; } @@ -511,7 +511,7 @@ main(int argc, char *argv[]) /* args specified */ int rc; const char *basep, *dir; - char *cwd; + char cwd[MAXPATHLEN]; char base[FILENAME_MAX]; char *p; @@ -524,13 +524,13 @@ main(int argc, char *argv[]) if (rc == -1) err(EXIT_FAILURE, "Cannot chdir to %s", _pkgdb_getPKGDB_DIR()); - cwd = getcwd(NULL, 0); + if (getcwd(cwd, sizeof(cwd)) == NULL) + err(EXIT_FAILURE, "getcwd"); p = findbestmatchingname(cwd, base); if (p) { printf("%s/%s\n", cwd, p); free(p); } - free(cwd); argv++; } diff --git a/pkgtools/pkg_install/files/lib/plist.c b/pkgtools/pkg_install/files/lib/plist.c index fe8baaf82a8..a6495267925 100644 --- a/pkgtools/pkg_install/files/lib/plist.c +++ b/pkgtools/pkg_install/files/lib/plist.c @@ -1,4 +1,4 @@ -/* $NetBSD: plist.c,v 1.2 2003/01/06 04:34:17 jschauma Exp $ */ +/* $NetBSD: plist.c,v 1.3 2003/04/17 14:00:55 grant Exp $ */ #if 0 #include <sys/cdefs.h> @@ -6,7 +6,7 @@ #if 0 static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp"; #else -__RCSID("$NetBSD: plist.c,v 1.2 2003/01/06 04:34:17 jschauma Exp $"); +__RCSID("$NetBSD: plist.c,v 1.3 2003/04/17 14:00:55 grant Exp $"); #endif #endif #endif @@ -389,10 +389,8 @@ delete_package(Boolean ign_err, Boolean nukedirs, package_t *pkg) if ((cp = MD5File(tmp, buf)) != NULL) { /* Mismatch? */ if (strcmp(cp, p->next->name + ChecksumHeaderLen) != 0) { - if (Verbose) { - printf("%s fails original MD5 checksum - %s\n", - tmp, Force ? "deleted anyway." : "not deleted."); - } + printf("original MD5 checksum failed, %s: %s\n", + Force ? "deleting anyway" : "not deleting", tmp); if (!Force) { fail = FAIL; continue; diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h index 472b4efbd5e..aa94f308392 100644 --- a/pkgtools/pkg_install/files/lib/version.h +++ b/pkgtools/pkg_install/files/lib/version.h @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.7 2003/04/11 14:40:37 grant Exp $ */ +/* $NetBSD: version.h,v 1.8 2003/04/17 14:00:55 grant Exp $ */ /* * Copyright (c) 2001 Thomas Klausner. All rights reserved. @@ -33,6 +33,6 @@ #ifndef _INST_LIB_VERSION_H_ #define _INST_LIB_VERSION_H_ -#define PKGTOOLS_VERSION "20030411" +#define PKGTOOLS_VERSION "20030417" #endif /* _INST_LIB_VERSION_H_ */ |