diff options
-rw-r--r-- | usr.sbin/pkg_install/add/perform.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index 6c83620..8b025d3 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -187,7 +187,7 @@ pkg_do(char *pkg) * compress an average of 75%, so multiply by 4 for good measure. */ - if (!inPlace && min_free(playpen) < sb.st_size * 4) { + if (!extract && !inPlace && min_free(playpen) < sb.st_size * 4) { warnx("projected size of %qd exceeds available free space.\n" "Please set your PKG_TMPDIR variable to point to a location with more\n" "free space and try again", (long long)sb.st_size * 4); @@ -200,8 +200,9 @@ pkg_do(char *pkg) if (inPlace && Fake) goto success; - /* Finally unpack the whole mess */ - if (unpack(pkg_fullname, NULL)) { + /* Finally unpack the whole mess. If extract is null we + already + did so so don't bother doing it again. */ + if (extract && unpack(pkg_fullname, NULL)) { warnx("unable to extract '%s'!", pkg_fullname); goto bomb; } |