Fix recursive package add problem (for on-disk package files) I introduced
with the change in semantics to make_playpen(). Now package dependencies more than 2 levels deep should work again. Pass the hat.
This commit is contained in:
parent
b131044669
commit
47d8228368
@ -1,6 +1,6 @@
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: perform.c,v 1.49 1998/02/16 17:16:14 jkh Exp $";
|
||||
"$Id: perform.c,v 1.50 1998/07/17 14:56:31 eivind Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -126,8 +126,11 @@ pkg_do(char *pkg)
|
||||
}
|
||||
Home = make_playpen(playpen, sb.st_size * 4);
|
||||
if (!Home)
|
||||
warnx("unable to make playpen for %d bytes", sb.st_size * 4);
|
||||
errx(1, "unable to make playpen for %d bytes", sb.st_size * 4);
|
||||
where_to = Home;
|
||||
/* Since we can call ourselves recursively, keep notes on where we came from */
|
||||
if (!getenv("_TOP"))
|
||||
setenv("_TOP", Home, 1);
|
||||
if (unpack(pkg_fullname, extract)) {
|
||||
warnx(
|
||||
"unable to extract table of contents file from `%s' - not a package?",
|
||||
@ -240,7 +243,7 @@ pkg_do(char *pkg)
|
||||
|
||||
if (!Fake) {
|
||||
if (!isURL(pkg) && !getenv("PKG_ADD_BASE")) {
|
||||
snprintf(path, FILENAME_MAX, "%s/%s.tgz", Home, p->name);
|
||||
snprintf(path, FILENAME_MAX, "%s/%s.tgz", getenv("_TOP"), p->name);
|
||||
if (fexists(path))
|
||||
cp = path;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user