From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 15 16:16:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC17816A402 for ; Sat, 15 Apr 2006 16:16:36 +0000 (UTC) (envelope-from hannes.hauswedell@gmail.com) Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D6C343D5C for ; Sat, 15 Apr 2006 16:16:35 +0000 (GMT) (envelope-from hannes.hauswedell@gmail.com) Received: by uproxy.gmail.com with SMTP id m3so193423ugc for ; Sat, 15 Apr 2006 09:16:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:reply-to:to:subject:date:user-agent:disposition-notification-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=grB7B1jYgBxVoGhlMKvlH4zvreZdJyUWPdBMRXfE7BOyjo/wRYxUoGja51810+XcgS+sbqEkdlOXpIBKjk+MxN8I8mBBNEwIjq/VdOMdx3GDOIIzbz39N3VgadVr2TYGUOqHzDJeSh9vUUAHG53mO7osj7EodZC9VszJLAgim38= Received: by 10.67.19.11 with SMTP id w11mr1328005ugi; Sat, 15 Apr 2006 09:16:34 -0700 (PDT) Received: from ?192.168.2.80? ( [85.220.132.38]) by mx.gmail.com with ESMTP id k30sm499487ugc.2006.04.15.09.16.32; Sat, 15 Apr 2006 09:16:33 -0700 (PDT) From: Hannes Hauswedell To: freebsd-hackers@freebsd.org Date: Sat, 15 Apr 2006 16:35:15 +0000 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Message-Id: <200604151635.16110.hannes.hauswedell@gmail.com> X-Mailman-Approved-At: Sat, 15 Apr 2006 16:35:38 +0000 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: weird problems with porupgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hannes Hauswedell List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2006 16:16:37 -0000 hi everybody! since some time now i am developing kports an advanced kde frontend for the freebsd-ports and in future also pkgsrc and openbsd ports. since the last release last summer i have gone through a complete rewrite and right now am at the point where i monitor portupgrades output and am having severe problems with portupgrade's behaviour. the problem is: depending on certain conditions portupgrade doesnt show a big part of the output. these conditions are: the application is started as a subprocess of another application, e.g. kdevelop and/or i use kprocess/qprocess to run the portupgrade command. if i run the applicaiton on its own and use popen() and pipes to access the output it works. this might make it appear to be a problem of the kprocess implementation, however i am pretty sure it is not. i have run the command with "| tee logfile" and the logfile also only has part of the output. this whole problem has been discussed @ http://www.bsdforen.de/showthread.php?p=119650 (in german), so if you speak german you could check that out. an example of the problem: i run the command "portupgrade -v -y -N -PP games/angband" without root previliges (this way the process is over pretty quickly). if run from inside a unix system pipe (file descriptor opened with popen and read with fgets) the output looks like this: -> Session started at: Thu, 06 Apr 2006 10:46:10 +0000 ---> Fresh installation of games/angband started at: Thu, 06 Apr 2006 10:46:17 +0000 ---> Checking for the latest package of 'games/angband' ---> Fetching the package(s) for 'angband-3.0.6' (games/angband) ---> Fetching angband-3.0.6 ++ Will try the following sites in the order named: ftp://ftp.de.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/ ---> Invoking a command: curl ftp://ftp.de.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/angband-3.0.6.tbz -o /var/tmp/portupgradeURBFUqpc/angband-3.0.6.tbz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 579k 0 1404 0 0 1423 0 0:06:57 --:--:-- 0:06:57 1423 20 579k 20 120k 0 0 75560 0 0:00:07 0:00:01 0:00:06 183k 59 579k 59 344k 0 0 130k 0 0:00:04 0:00:02 0:00:02 207k 96 579k 96 559k 0 0 153k 0 0:00:03 0:00:03 --:--:-- 210k 100 579k 100 579k 0 0 151k 0 0:00:03 0:00:03 --:--:-- 204k ---> Downloaded as angband-3.0.6.tbz ---> Identifying the package /var/tmp/portupgradeURBFUqpc/angband-3.0.6.tbz ** Failed to save the dowloaded tarball as /usr/ports/packages/All/angband-3.0.6.tbz ---> Listing the results (+:done / -:ignored / *:skipped / !:failed) ! angband-3.0.6 (Permission denied - /usr/ports/packages/All/angband-3.0.6.tbz) ---> Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed ** Could not clean up temporary directory: Directory not empty - /var/tmp/portupgradeURBFUqpc ---> Fetching the latest package(s) for 'angband' (games/angband) ---> Fetching angband ++ Will try the following sites in the order named: ftp://ftp.de.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/ ---> Invoking a command: curl ftp://ftp.de.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/angband.tbz -o /var/tmp/portupgrade7LnEZ0Si/angband.tbz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 579k 0 1404 0 0 1451 0 0:06:49 --:--:-- 0:06:49 1451 9 579k 9 56160 0 0 39568 0 0:00:15 0:00:01 0:00:14 118k 25 579k 25 147k 0 0 62424 0 0:00:09 0:00:02 0:00:07 100k 55 579k 55 322k 0 0 95434 0 0:00:06 0:00:03 0:00:03 128k 80 579k 80 464k 0 0 105k 0 0:00:05 0:00:04 0:00:01 134k 100 579k 100 579k 0 0 110k 0 0:00:05 0:00:05 --:--:-- 135k ---> Downloaded as angband.tbz ---> Identifying the package /var/tmp/portupgrade7LnEZ0Si/angband.tbz ** Failed to save the dowloaded tarball as /usr/ports/packages/All/angband-3.0.6.tbz ---> Listing the results (+:done / -:ignored / *:skipped / !:failed) ! angband@ (Permission denied - /usr/ports/packages/All/angband-3.0.6.tbz) ---> Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed ** Could not clean up temporary directory: Directory not empty - /var/tmp/portupgrade7LnEZ0Si ---> Fresh installation of games/angband ended at: Thu, 06 Apr 2006 10:46:31 +0000 (consumed 00:00:13) ---> Listing the results (+:done / -:ignored / *:skipped / !:failed) ! games/angband (package not found) ---> Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed ---> Session ended at: Thu, 06 Apr 2006 10:46:31 +0000 (consumed 00:00:20) however the same code, run as a subprocess of kdevelop misses the code colored in red. i have also checked the environemnt inside those process and tried encapsulating the command in "sh -c" without any results... now am out of ideas.... thanks for any help hannes p.s.: please cc to my email address i amnot a subscriber