diff options
author | max <max@FreeBSD.org> | 1997-10-24 08:32:06 +0000 |
---|---|---|
committer | max <max@FreeBSD.org> | 1997-10-24 08:32:06 +0000 |
commit | 8430e6b7e691ee45c2d1d013284b8ce6df0ac428 (patch) | |
tree | 0585224acdefbf62c8db14e785f0a01ddf2dbc25 /usr.sbin/pkg_install | |
parent | 83ab22e89fcd4269e122116ae594dcb1b9f92fb3 (diff) | |
download | FreeBSD-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.c | 8 |
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) |