From 8430e6b7e691ee45c2d1d013284b8ce6df0ac428 Mon Sep 17 00:00:00 2001 From: max Date: Fri, 24 Oct 1997 08:32:06 +0000 Subject: Pkg_add refused to process package whose packing list contains @exec/@unexec before any file names. This change makes pkg_add to process those packages if @exec/@unexec commands don't contain any %[fFB]. Also enable @exec/@unexec that have %D if the installation prefix is known to pkg_add. Reviewed by: jkh --- usr.sbin/pkg_install/add/extract.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pkg_install/add') diff --git a/usr.sbin/pkg_install/add/extract.c b/usr.sbin/pkg_install/add/extract.c index 96002d0..794e377 100644 --- a/usr.sbin/pkg_install/add/extract.c +++ b/usr.sbin/pkg_install/add/extract.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: extract.c,v 1.16 1997/07/01 06:13:35 jkh Exp $"; + "$Id: extract.c,v 1.17 1997/10/08 07:45:35 charnier Exp $"; #endif /* @@ -189,9 +189,13 @@ extract_plist(char *home, Package *pkg) break; case PLIST_CMD: - if (last_file == NULL) + if ((strstr(p->name, "%B") || strstr(p->name, "%F") || + strstr(p->name, "%f")) && last_file == NULL) cleanup(0), errx(2, "no last file specified for '%s' command", p->name); + if (strstr(p->name, "%D") && Directory == NULL) + cleanup(0), errx(2, "no directory specified for '%s' command", + p->name); format_cmd(cmd, p->name, Directory, last_file); PUSHOUT(Directory); if (Verbose) -- cgit v1.1