summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authormax <max@FreeBSD.org>1997-10-24 08:32:06 +0000
committermax <max@FreeBSD.org>1997-10-24 08:32:06 +0000
commit8430e6b7e691ee45c2d1d013284b8ce6df0ac428 (patch)
tree0585224acdefbf62c8db14e785f0a01ddf2dbc25 /usr.sbin/pkg_install
parent83ab22e89fcd4269e122116ae594dcb1b9f92fb3 (diff)
downloadFreeBSD-src-8430e6b7e691ee45c2d1d013284b8ce6df0ac428.zip
FreeBSD-src-8430e6b7e691ee45c2d1d013284b8ce6df0ac428.tar.gz
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
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/add/extract.c8
1 files changed, 6 insertions, 2 deletions
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)
OpenPOWER on IntegriCloud