Date: Mon, 19 Jun 2006 11:25:22 GMT From: Hannes Hauswedell <hannes.hauswedell@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/99179: Portupgrade: when STDIN is detected closed, no output is given. Message-ID: <200606191125.k5JBPMc1016240@www.freebsd.org> Resent-Message-ID: <200606191130.k5JBUHca068278@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 99179 >Category: ports >Synopsis: Portupgrade: when STDIN is detected closed, no output is given. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 19 11:30:17 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Hannes Hauswedell >Release: 6-STABLE >Organization: >Environment: FreeBSD fbsdmain.lan.home 6.0-STABLE FreeBSD 6.0-STABLE #2: Tue Feb 14 11:01:53 UTC 2006 root@fbsdmain.lan.home:/usr/obj/usr/src/sys/GENERIC i386 >Description: if STDIN is detected closed, subprocesses spawned by portupgrade show no ouput. STDIN is detected closed if portupgrade is a run inside a KDE or Qt Process. this makes it impossible to monitor output correctly. >How-To-Repeat: add <&- on the commandline, e.g.: portupgrade -v -y -N -PP games/angband <&- >Fix: fix the logged_command function (~ lines 480-490) in pkgtools.rb to read def logged_command(file, args) if !file args else ['/usr/bin/script', '-qa', file, *args] end end instead of def logged_command(file, args) if !file args elsif STDIN.tty? ['/usr/bin/script', '-qa', file, *args] else ['/bin/sh', '-c', sprintf('%s >>%s 2>&1', shelljoin(*args), shelljoin(file))] end end basically just remove the STDIN condition for the second call and remove the third. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606191125.k5JBPMc1016240>