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/delete Pull up revision 1.19 (requ...



details:   https://anonhg.NetBSD.org/src/rev/4a4deaa9dfb7
branches:  netbsd-1-5
changeset: 493147:4a4deaa9dfb7
user:      he <he%NetBSD.org@localhost>
date:      Wed Jun 26 16:53:39 2002 +0000

description:
Pull up revision 1.19 (requested by taca):
  Synchronize with recent developments:
   o close a memory leak
   o clarify error message if running out of file descriptors
   o implement new packing list directive, @blddep
   o improve buffer size checks
   o improve error handling on installation of prerequisite packages
   o add optional file verification (none, gpg, pgp5)

diffstat:

 usr.sbin/pkg_install/delete/main.c |  21 +++------------------
 1 files changed, 3 insertions(+), 18 deletions(-)

diffs (48 lines):

diff -r cb2181bbb352 -r 4a4deaa9dfb7 usr.sbin/pkg_install/delete/main.c
--- a/usr.sbin/pkg_install/delete/main.c        Wed Jun 26 16:53:27 2002 +0000
+++ b/usr.sbin/pkg_install/delete/main.c        Wed Jun 26 16:53:39 2002 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: main.c,v 1.16.2.2 2002/03/20 22:06:18 he Exp $ */
+/*     $NetBSD: main.c,v 1.16.2.3 2002/06/26 16:53:39 he Exp $ */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
 #else
-__RCSID("$NetBSD: main.c,v 1.16.2.2 2002/03/20 22:06:18 he Exp $");
+__RCSID("$NetBSD: main.c,v 1.16.2.3 2002/06/26 16:53:39 he Exp $");
 #endif
 #endif
 
@@ -55,21 +55,6 @@
 }
 
 int
-find_fn(const char *pkg, char *data)
-{
-       lpkg_t *lpp;
-       char fn[FILENAME_MAX];
-
-       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;
-}
-
-int
 main(int argc, char **argv)
 {
        int     ch, error;
@@ -159,7 +144,7 @@
                } else {
                        if (ispkgpattern(*argv)) {
                                int rc;
-                               rc = findmatchingname(_pkgdb_getPKGDB_DIR(), *argv, find_fn, NULL);
+                               rc = findmatchingname(_pkgdb_getPKGDB_DIR(), *argv, add_to_list_fn, &pkgs);
                                if (rc == 0)
                                        errx(1, "No matching pkg for %s.", *argv);
                                else if (rc == -1) 



Home | Main Index | Thread Index | Old Index