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/info Pull up revisions 1.21-1.23 (...



details:   https://anonhg.NetBSD.org/src/rev/5528969aa872
branches:  netbsd-1-5
changeset: 493152:5528969aa872
user:      he <he%NetBSD.org@localhost>
date:      Wed Jun 26 16:55:02 2002 +0000

description:
Pull up revisions 1.21-1.23 (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/info/show.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (51 lines):

diff -r f48eee82c99f -r 5528969aa872 usr.sbin/pkg_install/info/show.c
--- a/usr.sbin/pkg_install/info/show.c  Wed Jun 26 16:54:46 2002 +0000
+++ b/usr.sbin/pkg_install/info/show.c  Wed Jun 26 16:55:02 2002 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: show.c,v 1.20 2000/02/22 01:24:32 hubertf Exp $        */
+/*     $NetBSD: show.c,v 1.20.4.1 2002/06/26 16:55:02 he Exp $ */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
 #else
-__RCSID("$NetBSD: show.c,v 1.20 2000/02/22 01:24:32 hubertf Exp $");
+__RCSID("$NetBSD: show.c,v 1.20.4.1 2002/06/26 16:55:02 he Exp $");
 #endif
 #endif
 
@@ -74,7 +74,7 @@
  * The entries in this table must be ordered the same as
  * pl_ent_t constants
  */
-static show_t showv[] = {
+static const show_t showv[] = {
        {PLIST_FILE, "%s", "\tFile: %s"},
        {PLIST_CWD, "@cwd %s", "\tCWD to: %s"},
        {PLIST_CMD, "@exec %s", "\tEXEC '%s'"},
@@ -94,6 +94,7 @@
        "\tIgnore next file installation directive (doesn't belong)"},
        {PLIST_OPTION, "@option %s", "\tPackage has option: %s"},
        {PLIST_PKGCFL, "@pkgcfl %s", "\tPackage conflicts with: %s"},
+       {PLIST_BLDDEP, "@blddep %s", "\tPackage depends exactly on: %s"},
        {-1, NULL, NULL}
 };
 
@@ -110,7 +111,7 @@
        if ((fp = fopen(fname, "r")) == (FILE *) NULL) {
                printf("ERROR: show_file: Can't open '%s' for reading!\n", fname);
        } else {
-               while ((n = fread(line, 1, 1024, fp)) != 0) {
+               while ((n = fread(line, 1, sizeof(line), fp)) != 0) {
                        fwrite(line, 1, n, stdout);
                }
                (void) fclose(fp);
@@ -195,6 +196,7 @@
                        case PLIST_DIR_RM:
                        case PLIST_OPTION:
                        case PLIST_PKGCFL:
+                       case PLIST_BLDDEP:
                                printf(Quiet ? showv[p->type].sh_quiet : showv[p->type].sh_verbose, p->name);
                                break;
                        default:



Home | Main Index | Thread Index | Old Index