Date: Sat, 15 Apr 2006 12:33:15 -0500 From: Eric Schuele <e.schuele@computer.org> To: Hannes Hauswedell <hannes.hauswedell@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: weird problems with porupgrade Message-ID: <44412E5B.2050202@computer.org> In-Reply-To: <200604151635.16110.hannes.hauswedell@gmail.com> References: <200604151635.16110.hannes.hauswedell@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hannes Hauswedell wrote: > 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. Could it be you are seeing the differences between stdout and stderr? > > 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 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Regards, Eric
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44412E5B.2050202>