ports/99179: Portupgrade: when STDIN is detected closed, no output is given.

Hannes Hauswedell hannes.hauswedell at gmail.com
Mon Jun 19 11:30:27 UTC 2006


>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 at 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:



More information about the freebsd-ports-bugs mailing list