Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/pkg_install/info Pull up revisions 1.21-1.23 (...



details:   https://anonhg.NetBSD.org/src/rev/04e6c9941da7
branches:  netbsd-1-4
changeset: 470828:04e6c9941da7
user:      he <he%NetBSD.org@localhost>
date:      Mon Jul 31 18:18:53 2000 +0000

description:
Pull up revisions 1.21-1.23 (requested by hubertf):
  Update pkg_install tools by bringing in bug fixes and feature
  additions since the last release.  Fixes PR#10083 and PR#10687
  and a number of problems not formally reported.

diffstat:

 usr.sbin/pkg_install/info/main.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r 06d471532c9c -r 04e6c9941da7 usr.sbin/pkg_install/info/main.c
--- a/usr.sbin/pkg_install/info/main.c  Mon Jul 31 18:18:50 2000 +0000
+++ b/usr.sbin/pkg_install/info/main.c  Mon Jul 31 18:18:53 2000 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: main.c,v 1.16.2.4 2000/01/15 16:25:40 he Exp $ */
+/*     $NetBSD: main.c,v 1.16.2.5 2000/07/31 18:18:53 he Exp $ */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp";
 #else
-__RCSID("$NetBSD: main.c,v 1.16.2.4 2000/01/15 16:25:40 he Exp $");
+__RCSID("$NetBSD: main.c,v 1.16.2.5 2000/07/31 18:18:53 he Exp $");
 #endif
 #endif
 
@@ -65,9 +65,13 @@
 find_fn(const char *pkg, char *data)
 {
        lpkg_t *lpp;
+       char fn[FILENAME_MAX];
 
-       lpp = alloc_lpkg(pkg);
-       TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
+       snprintf(fn, sizeof(fn), "%s/%s", _pkgdb_getPKGDB_DIR(), pkg);
+       if (!isfile(fn)) {      /* might as well use sanity_check() */
+               lpp = alloc_lpkg(pkg);
+               TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
+       }
 
        return 0;
 }
@@ -202,7 +206,7 @@
                s = pkgdb_retrieve(CheckPkg);
 
                if (s) {
-                       CheckPkg = s;
+                       CheckPkg = strdup(s);
                } else {
                        errx(1, "No matching pkg for %s.", CheckPkg);
                }



Home | Main Index | Thread Index | Old Index