From nobody@FreeBSD.org  Sun Mar 31 21:32:11 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 434D537B41E
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 31 Mar 2002 21:32:10 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g315WAC22059;
	Sun, 31 Mar 2002 21:32:10 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200204010532.g315WAC22059@freefall.freebsd.org>
Date: Sun, 31 Mar 2002 21:32:10 -0800 (PST)
From: Mark Fullmer <maf@splintered.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Adding packages with sysinstall failes after 
X-Send-Pr-Version: www-1.0

>Number:         36606
>Category:       conf
>Synopsis:       Adding packages with sysinstall failes after
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 31 21:40:01 PST 2002
>Closed-Date:    Sun Apr 14 06:26:47 PDT 2002
>Last-Modified:  Sun Apr 14 06:26:47 PDT 2002
>Originator:     Mark Fullmer
>Release:        4.5-STABLE (20020327)
>Organization:
OARNet
>Environment:
FreeBSD base4.oar.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Mar 27 14:47:36 EST 2002     maf@base4.oar.net:/usr/src/sys/compile/BASE4  i386

>Description:
pkg_add fails when the package is delivered via stdin (pkg_add -).  This
appears to have been triggered by gnu/30876, but the problem seems to
be in pkg_add itself.  sysinstall can no longer install packages.
>How-To-Repeat:
Before the buffer.c patch to tar in gnu/30876:
char:/tmp# pkg_add - < zoo-2.10.1.tgz   

gzip: stdin: unexpected end of file
tar: child returned status 1
The package is successfully installed though.

After the buffer.c patch:

char:/tmp# pkg_add - < zoo-2.10.1.tgz   

gzip: stdin: unexpected end of file
tar: child returned status 1
pkg_add: tar extract of - failed!
pkg_add: unable to extract `-'!
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: murray 
State-Changed-When: Tue Apr 2 04:29:24 PST 2002 
State-Changed-Why:  
David O'Brien and I spent time analyzing this.  I have a fix that I 
will commit to -CURRENT momentarily. 



Responsible-Changed-From-To: freebsd-bugs->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Tue Apr 2 04:29:24 PST 2002 
Responsible-Changed-Why:  
David O'Brien and I spent time analyzing this.  I have a fix that I 
will commit to -CURRENT momentarily. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=36606 

From: Murray Stokely <murray@FreeBSD.org>
To: maf@splintered.net, freebsd-bugs@FreeBSD.org
Cc:  
Subject: Re: conf/36606: Adding packages with sysinstall failes after
Date: Tue, 2 Apr 2002 04:53:31 -0800

 --EVF5PPMfhYS0aIcm
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
   Attached is a patch against -STABLE.  Can you please confirm that
 this solves the problems you are experiencing?  The has already been
 applied to -CURRENT.
 
 Index: perform.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /a/ncvs/src/usr.sbin/pkg_install/add/perform.c,v
 retrieving revision 1.57.2.8
 diff -u -r1.57.2.8 perform.c
 --- perform.c	23 Oct 2001 09:16:03 -0000	1.57.2.8
 +++ perform.c	2 Apr 2002 11:51:13 -0000
 @@ -189,7 +189,7 @@
  	     * compress an average of 75%, so multiply by 4 for good measure.
  	     */
 =20
 -	    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);
 @@ -202,8 +202,9 @@
  	    if (inPlace && Fake)
  		goto success;
 =20
 -	    /* 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;
  	    }
 
 
 
 
 On Tue, Apr 02, 2002 at 04:29:58AM -0800, murray@FreeBSD.org wrote:
 > Synopsis: Adding packages with sysinstall failes after
 >=20
 > State-Changed-From-To: open->analyzed
 > State-Changed-By: murray
 > State-Changed-When: Tue Apr 2 04:29:24 PST 2002
 > State-Changed-Why:=20
 > David O'Brien and I spent time analyzing this.  I have a fix that I
 > will commit to -CURRENT momentarily.
 >=20
 >=20
 >=20
 > Responsible-Changed-From-To: freebsd-bugs->murray
 > Responsible-Changed-By: murray
 > Responsible-Changed-When: Tue Apr 2 04:29:24 PST 2002
 > Responsible-Changed-Why:=20
 > David O'Brien and I spent time analyzing this.  I have a fix that I
 > will commit to -CURRENT momentarily.
 >=20
 >=20
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D36606
 >=20
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-bugs" in the body of the message
 
 --EVF5PPMfhYS0aIcm
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (SunOS)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE8qanLtNcQog5FH30RAu0UAKCsved/N1JyuhaXB7X8Mi8lAMlX3wCgpCZM
 V/MVe0OSTUcQZdwA0aQicpM=
 =HZHD
 -----END PGP SIGNATURE-----
 
 --EVF5PPMfhYS0aIcm--
State-Changed-From-To: analyzed->closed 
State-Changed-By: murray 
State-Changed-When: Sun Apr 14 06:16:21 PDT 2002 
State-Changed-Why:  
This has been fixed in both -CURRENT and -STABLE, FreeBSD 4.6 will not 
have this problem.  Thanks for the submission! 


http://www.freebsd.org/cgi/query-pr.cgi?pr=36606 
>Unformatted:
