summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2002-04-02 12:47:10 +0000
committermurray <murray@FreeBSD.org>2002-04-02 12:47:10 +0000
commitd4697121d1d57dd658da180012d13d1e1ba6b350 (patch)
tree445ce5f606e0bca8b28669c39d5ae3c342266b06 /usr.sbin/pkg_install
parent0ca247271e1c842f55e2ec2e09371da7ffce72c5 (diff)
downloadFreeBSD-src-d4697121d1d57dd658da180012d13d1e1ba6b350.zip
FreeBSD-src-d4697121d1d57dd658da180012d13d1e1ba6b350.tar.gz
DTRT for packages read from STDIN:
$ cat pkg.tgz | pkg_add - The above command line will fail on -CURRENT or -STABLE, and therefore, so will sysinstall if you try to install additional packages through the network (FTP) from a multiuser system. Because of the different environment during installation (wrt the playpen), this bug does not manifest itself during initial installs, and users may install packages from the network just fine at that time. This bug was fixed in OpenBSD 4 years ago. ---------------------------- revision 1.4 date: 1998/04/07 05:56:13; author: marc; state: Exp; lines: +13 -8 fix package input from standard input -- the program tried to process stdin twice. Note: it assumes stdin is a compressed tar file. ---------------------------- PR: conf/36606 Obtained from: OpenBSD MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/add/perform.c7
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;
}
OpenPOWER on IntegriCloud