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
This commit is contained in:
parent
aeeb2b2bbb
commit
1bb336ef80
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user