Fix a bug in pkg_info -f with @pkgcfl entries.
This commit is contained in:
parent
65e1849228
commit
82f2922229
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pkg_create.1,v 1.9 1998/10/09 09:22:16 agc Exp $
|
||||
.\" $NetBSD: pkg_create.1,v 1.10 1998/10/09 09:35:39 agc Exp $
|
||||
.\"
|
||||
.\" FreeBSD install - a package for the installation and maintainance
|
||||
.\" of non-core utilities.
|
||||
@ -86,9 +86,8 @@ or, if preceded by
|
||||
.Cm - ,
|
||||
the argument itself.
|
||||
.It Fl O
|
||||
Go into a `packing list Only' mode. This is a custom hack for the
|
||||
.Em "FreeBSD Ports Collection"
|
||||
and is used to do `fake pkg_add' operations when a port is installed.
|
||||
Go into a `packing list Only' mode.
|
||||
This is used to do `fake pkg_add' operations when a package is installed.
|
||||
In such cases, it is necessary to know what the final, adjusted packing
|
||||
list will look like.
|
||||
.It Fl v
|
||||
|
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: perform.c,v 1.15 1998/10/08 12:58:00 agc Exp $ */
|
||||
/* $NetBSD: perform.c,v 1.16 1998/10/09 09:35:39 agc 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.15 1998/10/08 12:58:00 agc Exp $");
|
||||
__RCSID("$NetBSD: perform.c,v 1.16 1998/10/09 09:35:39 agc Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -154,7 +154,7 @@ pkg_do(char *pkg)
|
||||
if ((Flags & SHOW_DISPLAY) && fexists(DISPLAY_FNAME))
|
||||
show_file("Install notice:\n", DISPLAY_FNAME);
|
||||
if (Flags & SHOW_PLIST)
|
||||
show_plist("Packing list:\n", &plist, (plist_t) - 1);
|
||||
show_plist("Packing list:\n", &plist, PLIST_SHOW_ALL);
|
||||
if ((Flags & SHOW_INSTALL) && fexists(INSTALL_FNAME))
|
||||
show_file("Install script:\n", INSTALL_FNAME);
|
||||
if ((Flags & SHOW_DEINSTALL) && fexists(DEINSTALL_FNAME))
|
||||
|
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: show.c,v 1.5 1997/10/17 14:54:20 lukem Exp $ */
|
||||
/* $NetBSD: show.c,v 1.6 1998/10/09 09:35:39 agc 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.5 1997/10/17 14:54:20 lukem Exp $");
|
||||
__RCSID("$NetBSD: show.c,v 1.6 1998/10/09 09:35:39 agc Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -76,7 +76,7 @@ show_index(char *title, char *fname)
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
/* Show a packing list item type. If type is -1, show all */
|
||||
/* Show a packing list item type. If type is PLIST_SHOW_ALL, show all */
|
||||
void
|
||||
show_plist(char *title, Package *plist, plist_t type)
|
||||
{
|
||||
@ -87,7 +87,7 @@ show_plist(char *title, Package *plist, plist_t type)
|
||||
printf("%s%s", InfoPrefix, title);
|
||||
p = plist->head;
|
||||
while (p) {
|
||||
if (p->type != type && type != -1) {
|
||||
if (p->type != type && type != PLIST_SHOW_ALL) {
|
||||
p = p->next;
|
||||
continue;
|
||||
}
|
||||
@ -166,6 +166,10 @@ show_plist(char *title, Package *plist, plist_t type)
|
||||
printf(Quiet ? "@dirrm %s\n" : "\tDeinstall directory remove: %s\n", p->name);
|
||||
break;
|
||||
|
||||
case PLIST_PKGCFL:
|
||||
printf(Quiet ? "@pkgcfl %s\n" : "\tPackage conflicts with: %s\n", p->name);
|
||||
break;
|
||||
|
||||
default:
|
||||
cleanup(0);
|
||||
errx(2, "unknown command type %d (%s)", p->type, p->name);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lib.h,v 1.12 1998/10/09 09:22:17 agc Exp $ */
|
||||
/* $NetBSD: lib.h,v 1.13 1998/10/09 09:35:40 agc Exp $ */
|
||||
|
||||
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
|
||||
|
||||
@ -80,14 +80,27 @@
|
||||
/* The name of the "prefix" environment variable given to scripts */
|
||||
#define PKG_PREFIX_VNAME "PKG_PREFIX"
|
||||
|
||||
enum _plist_t {
|
||||
PLIST_FILE, PLIST_CWD, PLIST_CMD, PLIST_CHMOD,
|
||||
PLIST_CHOWN, PLIST_CHGRP, PLIST_COMMENT, PLIST_IGNORE,
|
||||
PLIST_NAME, PLIST_UNEXEC, PLIST_SRC, PLIST_DISPLAY,
|
||||
PLIST_PKGDEP, PLIST_MTREE, PLIST_DIR_RM, PLIST_IGNORE_INST,
|
||||
PLIST_OPTION, PLIST_PKGCFL
|
||||
};
|
||||
typedef enum _plist_t plist_t;
|
||||
typedef enum _plist_t {
|
||||
PLIST_SHOW_ALL = -1,
|
||||
PLIST_FILE,
|
||||
PLIST_CWD,
|
||||
PLIST_CMD,
|
||||
PLIST_CHMOD,
|
||||
PLIST_CHOWN,
|
||||
PLIST_CHGRP,
|
||||
PLIST_COMMENT,
|
||||
PLIST_IGNORE,
|
||||
PLIST_NAME,
|
||||
PLIST_UNEXEC,
|
||||
PLIST_SRC,
|
||||
PLIST_DISPLAY,
|
||||
PLIST_PKGDEP,
|
||||
PLIST_MTREE,
|
||||
PLIST_DIR_RM,
|
||||
PLIST_IGNORE_INST,
|
||||
PLIST_OPTION,
|
||||
PLIST_PKGCFL
|
||||
} plist_t;
|
||||
|
||||
/* Types */
|
||||
typedef unsigned int Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user