From nobody@FreeBSD.org  Tue Feb 17 06:47:41 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8839D16A4CF
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 17 Feb 2004 06:47:37 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 84E2A43D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 17 Feb 2004 06:47:37 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i1HElb72004768
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 17 Feb 2004 06:47:37 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i1HElbwi004764;
	Tue, 17 Feb 2004 06:47:37 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200402171447.i1HElbwi004764@www.freebsd.org>
Date: Tue, 17 Feb 2004 06:47:37 -0800 (PST)
From: Jochen Gensch <incmc@gmx.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_add -r fails if fetching multiple packages at a time
X-Send-Pr-Version: www-2.3
X-GNATS-Notify: vs

>Number:         62965
>Category:       bin
>Synopsis:       pkg_add(1) -r fails if fetching multiple packages at a time
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 17 06:50:20 PST 2004
>Closed-Date:    Wed May 28 15:17:03 UTC 2014
>Last-Modified:  Wed May 28 15:17:03 UTC 2014
>Originator:     Jochen Gensch
>Release:        5.2 + 4.8
>Organization:
>Environment:
FreeBSD incmc.da-butze.uga 5.2.1-RC2 FreeBSD 5.2.1-RC2 #0: Mon Feb 16 19:47:12 CET 2004     root@incmc.da-butze.uga:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
If you try to add multiple packages at a time by using "pkg_add -r Packet_1 Packet_2 Packet_3 ..." then it will abort sometime with the error messsage as follows:

Xmms supports Gzipped and uncompressed skins.  If you would like to use
Zip format skins you will need to ensure archivers/unzip is installed.

---
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5.2-release/Latest/xmms-arts.tbz...pkg_add: fatal error during execution: getcwd
---

This has occured on different machines here, when I tried to install 2 or 4 packages at a time.



>How-To-Repeat:
Try to install multiple binaries by using "pkg_add -r Packet_1 Packet_2...". 
>Fix:
      
>Release-Note:
>Audit-Trail:

From: "Michael Postmann" <postmann@s2o.at>
To: <freebsd-gnats-submit@FreeBSD.org>, <incmc@gmx.de>
Cc:  
Subject: Re: bin/62965: pkg_add -r fails if fetching multiple packages at a time
Date: Fri, 10 Sep 2004 14:21:41 +0200

 Same Problem here:
 FreeBSD 5.2.1
 Computer: PentiumII-400 with 180MB Ram, Intel Mainboard.
 
 Workaround:
 Start pkg_add several times until it has installed everything.
 
Responsible-Changed-From-To: freebsd-bugs->eik 
Responsible-Changed-By: vs 
Responsible-Changed-When: Mon Feb 14 08:40:29 GMT 2005 
Responsible-Changed-Why:  
eik is our pkg_install-hacker-in-residence (and I'm bitten by this, too) 
Also a bit more details: Replacing upchuck() with err() yields (on 4.x): 

ocaml-pxp@menelaos [09:42:30]> ktrace -d pkg_add -r ocaml ocaml-findlib ocmal-ulex Fetching ftp://sunsite.informatik.rwth-aachen.de/pub/FreeBSD/ports/i386/packages-4-stable/Latest/ocaml.tgz... Done. 
Fetching ftp://sunsite.informatik.rwth-aachen.de/pub/FreeBSD/ports/i386/packages-4-stable/All/tcl-8.4.7,1.tgz... Done. 
Fetching ftp://sunsite.informatik.rwth-aachen.de/pub/FreeBSD/ports/i386/packages-4-stable/All/tk-8.4.7,2.tgz... Done. 
Fetching ftp://sunsite.informatik.rwth-aachen.de/pub/FreeBSD/ports/i386/packages-4-stable/Latest/ocaml-findlib.tgz...pkg_add: No such file or directory 

ktrace: 
441 pkg_add  CALL  chmod(0xbfbfc8c0,0x1c0) 
441 pkg_add  NAMI  "/usr/tmp/instmp.XMryEv" 
441 pkg_add  RET   chmod 0 
441 pkg_add  CALL  statfs(0xbfbfc8c0,0xbfbfa740) 
441 pkg_add  NAMI  "/usr/tmp/instmp.XMryEv" 
441 pkg_add  RET   statfs 0 
441 pkg_add  CALL  __getcwd(0x8056360,0x400) 
441 pkg_add  RET   __getcwd -1 errno 20 Not a directory 
441 pkg_add  CALL  stat(0x28239e20,0xbfbfa7e0) 
441 pkg_add  NAMI  "/" 
441 pkg_add  RET   stat 0 
441 pkg_add  CALL  lstat(0x808b000,0xbfbfa7e0) 
441 pkg_add  NAMI  "." 
441 pkg_add  RET   lstat 0 
441 pkg_add  CALL  stat(0x808b000,0xbfbfa6b0) 
441 pkg_add  NAMI  ".." 
441 pkg_add  RET   stat -1 errno 2 No such file or directory 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62965 
Responsible-Changed-From-To: eik->krion 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jul 18 05:36:19 GMT 2005 
Responsible-Changed-Why:  
krion is looking after these tools now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62965 
State-Changed-From-To: open->feedback 
State-Changed-By: krion 
State-Changed-When: Sat Nov 12 12:36:51 GMT 2005 
State-Changed-Why:  
Can you reproduce it on FreeBSD 6.x 4 5 6 7 I checked it, but couldn't 
reproduce it. 

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

From: Jochen Gensch <incmc@gmx.de>
To: bug-followup@FreeBSD.org,  incmc@gmx.de
Cc:  
Subject: Re: bin/62965: pkg_add -r fails if fetching multiple packages at
 a time
Date: Mon, 14 Nov 2005 00:11:22 +0100

 Yes I can still reproduce it under 6.0-RELEASE.
 
 SU spielen ~:pkg_add -r cvsup-without-gui mc portupgrade bash
 Fetching
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/Latest/cvsup-without-gui.tbz...
 Done.
 pkg_add: package 'cvsup-without-gui-16.1h_2' or its older version
 already installed
 Fetching
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/Latest/mc.tbz...
 Done.
 Fetching
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/All/libslang-1.4.9.tbz...
 Done.
 Fetching
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/All/glib-2.6.6.tbz...
 Done.
 pkg_add: warning: package 'glib-2.6.6' requires 'pkgconfig-0.17.2', but
 'pkgconfig-0.15.0_1' is installed
 pkg_add: warning: package 'glib-2.6.6' requires 'gettext-0.14.5', but
 'gettext-0.13.1_1' is installed
 pkg_add: warning: package 'mc-4.6.0_15' requires 'pkgconfig-0.17.2', but
 'pkgconfig-0.15.0_1' is installed
 pkg_add: warning: package 'mc-4.6.0_15' requires 'gettext-0.14.5', but
 'gettext-0.13.1_1' is installed
 Fetching
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/Latest/portupgrade.tbz...pkg_add:
 fatal error during execution: getcwd
 
 However this only seems to happen with a few packages.
 
 Jochen

From: christop <christop@physik.tu-berlin.de>
To: bug-followup@FreeBSD.org,  incmc@gmx.de
Cc: Tutoren PC-Pool Physik <tutoren@physik.TU-Berlin.DE>
Subject: Re: bin/62965: pkg_add -r fails if fetching multiple packages at
 a time
Date: Thu, 17 May 2007 12:17:00 +0200

 I made a fresh FreeBSD-6.2 install and this bug is still there. I had
 this problem with an a lot of pkgs. Later i tried
 -----
 pkg_add -r pam_ldap php-suhosin psi gajim qca qca-tls seamonkey
 subversion typo3 wget vim wmii workrave xfig gnuplot octave
 -----
 and every time pkg_add failed, i deleted the pkg in the command line
 behind pam_ldap and restarted, but it didn`t help. They all failed like
 this:
 -----
 pkg_add -r pam_ldap wmii workrave xfig gnuplot octave
 Fetching
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/=
 pam_ldap.tbz...
 Done.
 Fetching
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/All/ope=
 nldap-client-2.3.27.tbz...
 Done.
 pkg_add: package 'openldap-client-2.3.27' conflicts with
 openldap-sasl-client-2.3.27
 pkg_add: please use pkg_delete first to remove conflicting package(s) or
 -f to force installation
 pkg_add: pkg_add of dependency 'openldap-client-2.3.27' failed!
 Fetching
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/=
 wmii.tbz...pkg_add:
 fatal error during execution: getcwd
 -----
 At least i deleted openldap-sasl-client-2.3.27 and restart
 ----
 pkg_add -r pam_ldap psi gajim qca qca-tls seamonkey subversion typo3
 wget vim wmii workrave xfig gnuplot octave
 ----
 This time install of pam_ldap work smoothly, but the pkg behind failed
 again. There might be a problem with installing a pkg after you already
 install a pkg with dependencies.
 
 This workaround help me:
 -----
 #!/bin/sh
 pkg=3D"long space separated list of pkgs"
 
 for i in $pkg
 #do echo $i
 do /usr/sbin/pkg_add -r $i
 done
 -----
 
State-Changed-From-To: feedback->suspended 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 1 23:30:39 UTC 2008 
State-Changed-Why:  
Submitter notes that this is still a problem.  Mark as suspended since it 
does not seem that this is being worked on. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62965 
Responsible-Changed-From-To: krion->portmgr 
Responsible-Changed-By: flz 
Responsible-Changed-When: Fri Jul 17 13:42:13 UTC 2009 
Responsible-Changed-Why:  
pkg_install is maintained by portmgr. 

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

From: Garrett Cooper <yanegomi@gmail.com>
To: bug-followup@FreeBSD.org, incmc@gmx.de
Cc:  
Subject: Re: bin/62965: pkg_add(1) -r fails if fetching multiple packages at a 
	time
Date: Sun, 21 Mar 2010 15:44:54 -0700

     I'd need to take a look at the plists, but my guess is that it's
 [most likely] related to leave_playpen (I've seen this issue a handful
 of times over the past week if I am installing packages in a loop,
 screw up and jam on CTRL-C -- this was with 8-STABLE), or it might be
 an issue with the @cwd directive if it's not properly backtracking.
 Thanks,
 -Garrett

From: Garrett Cooper <yanegomi@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/62965: pkg_add(1) -r fails if fetching multiple packages at a 
	time
Date: Sun, 21 Mar 2010 18:49:32 -0700

 On Sun, Mar 21, 2010 at 3:44 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
 > =A0 =A0I'd need to take a look at the plists, but my guess is that it's
 > [most likely] related to leave_playpen (I've seen this issue a handful
 > of times over the past week if I am installing packages in a loop,
 > screw up and jam on CTRL-C -- this was with 8-STABLE), or it might be
 > an issue with the @cwd directive if it's not properly backtracking.
 
     FYI, bug filer is MTA entry is MIA...
 Thanks,
 -Garrett
State-Changed-From-To: suspended->closed 
State-Changed-By: bapt 
State-Changed-When: Wed May 28 15:17:03 UTC 2014 
State-Changed-Why:  
pkg_install is not being worked on anymore 

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