Michael Vogt лет назад: 13
Родитель
Сommit
95795be79b
2 измененных файлов с 4 добавлено и 1 удалено
  1. 1 1
      apt-pkg/deb/dpkgpm.cc
  2. 3 0
      debian/changelog

+ 1 - 1
apt-pkg/deb/dpkgpm.cc

@@ -1205,7 +1205,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 
       // if tcgetattr does not return zero there was a error
       // and we do not do any pty magic
-      if (tcgetattr(0, &tt) == 0)
+      if (tcgetattr(STDOUT_FILENO, &tt) == 0)
       {
 	 ioctl(0, TIOCGWINSZ, (char *)&win);
 	 if (openpty(&master, &slave, NULL, &tt, &win) < 0) 

+ 3 - 0
debian/changelog

@@ -14,6 +14,9 @@ apt (0.9.8~exp1) UNRELEASED; urgency=low
   * lp:~mvo/apt/config-clear:
     - support Configuration.Clear() for a clear of the entire 
       configuration
+  * apt-pkg/deb/dpkgpm.cc:
+    - use tcgetattr() on STDOUT instead of STDIN so that term.log
+      works for redirected stdin
 
  -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 09 Jul 2012 17:36:40 +0200