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 revision 1.31 (reques...
details: https://anonhg.NetBSD.org/src/rev/51942b85f690
branches: netbsd-1-4
changeset: 470829:51942b85f690
user: he <he%NetBSD.org@localhost>
date: Mon Jul 31 18:18:57 2000 +0000
description:
Pull up revision 1.31 (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/perform.c | 35 ++++++++++++++++++-----------------
1 files changed, 18 insertions(+), 17 deletions(-)
diffs (77 lines):
diff -r 04e6c9941da7 -r 51942b85f690 usr.sbin/pkg_install/info/perform.c
--- a/usr.sbin/pkg_install/info/perform.c Mon Jul 31 18:18:53 2000 +0000
+++ b/usr.sbin/pkg_install/info/perform.c Mon Jul 31 18:18:57 2000 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: perform.c,v 1.23.2.4 2000/01/31 20:58:10 he Exp $ */
+/* $NetBSD: perform.c,v 1.23.2.5 2000/07/31 18:18:57 he Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.23 1997/10/13 15:03:53 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.23.2.4 2000/01/31 20:58:10 he Exp $");
+__RCSID("$NetBSD: perform.c,v 1.23.2.5 2000/07/31 18:18:57 he Exp $");
#endif
#endif
@@ -48,8 +48,6 @@
Boolean installed = FALSE, isTMP = FALSE;
char log_dir[FILENAME_MAX];
char fname[FILENAME_MAX];
- package_t plist;
- FILE *fp;
struct stat sb;
char *cp = NULL;
int code = 0;
@@ -134,18 +132,6 @@
installed = TRUE;
}
- /* Suck in the contents list */
- plist.head = plist.tail = NULL;
- fp = fopen(CONTENTS_FNAME, "r");
- if (!fp) {
- warnx("unable to open %s file", CONTENTS_FNAME);
- code = 1;
- goto bail;
- }
- /* If we have a prefix, add it now */
- read_plist(&plist, fp);
- fclose(fp);
-
/*
* Index is special info type that has to override all others to make
* any sense.
@@ -156,6 +142,21 @@
(void) snprintf(tmp, sizeof(tmp), "%-19s ", pkg);
show_index(tmp, COMMENT_FNAME);
} else {
+ FILE *fp;
+ package_t plist;
+
+ /* Read the contents list */
+ plist.head = plist.tail = NULL;
+ fp = fopen(CONTENTS_FNAME, "r");
+ if (!fp) {
+ warnx("unable to open %s file", CONTENTS_FNAME);
+ code = 1;
+ goto bail;
+ }
+ /* If we have a prefix, add it now */
+ read_plist(&plist, fp);
+ fclose(fp);
+
/* Start showing the package contents */
if (!Quiet) {
printf("%sInformation for %s:\n\n", InfoPrefix, pkg);
@@ -208,8 +209,8 @@
if (!Quiet) {
puts(InfoPrefix);
}
+ free_plist(&plist);
}
- free_plist(&plist);
bail:
leave_playpen(Home);
if (isTMP)
Home |
Main Index |
Thread Index |
Old Index