Package: aptitude Version: 0.4.11.11-1 Severity: minor Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu lucid ubuntu-patch
On large terminals (maxizmied gnome-terminal) aptitude update can hang. The attached patch fixes it, see http://launchpad.net/bugs/391035 for additional information. Thanks, Michael -- Package-specific info: aptitude 0.4.11.11 compiled at Feb 15 2010 18:41:55 Compiler: g++ 4.4.3 Compiled against: apt version 4.8.0 NCurses version 5.7 libsigc++ version: 2.2.4.2 Ept support enabled. Current library versions: NCurses version: ncurses 5.7.20090803 cwidget version: 0.5.13 Apt version: 4.8.0 linux-gate.so.1 => (0x00a4f000) libapt-pkg-libc6.10-6.so.4.8 => /usr/lib/libapt-pkg-libc6.10-6.so.4.8 (0x00ef3000) libncursesw.so.5 => /lib/libncursesw.so.5 (0x0090c000) libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0 (0x00840000) libcwidget.so.3 => /usr/lib/libcwidget.so.3 (0x006bb000) libept.so.0 => /usr/lib/libept.so.0 (0x00596000) libxapian.so.15 => /usr/lib/libxapian.so.15 (0x00d54000) libz.so.1 => /lib/libz.so.1 (0x00a18000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00110000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00c1f000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00129000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00956000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x0014f000) libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0x00643000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x002a3000) /lib/ld-linux.so.2 (0x00797000) Terminal: xterm $DISPLAY is set. `which aptitude`: /usr/bin/aptitude aptitude version information: aptitude linkage: *** /tmp/tmpYbo9GE In Ubuntu, we've applied the attached patch to achieve the following: * 13_screensize.dpatch: - Fixes a bug that stops outputting aptitude downloads on big screens (LP: #391035). We thought you might be interested in doing the same. -- System Information: Debian Release: squeeze/sid APT prefers lucid APT policy: (500, 'lucid') Architecture: i386 (i686) Kernel: Linux 2.6.32-12-generic (SMP w/2 CPU cores) Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -u aptitude-0.4.11.11/debian/changelog aptitude-0.4.11.11/debian/changelog diff -u aptitude-0.4.11.11/debian/patches/00list aptitude-0.4.11.11/debian/patches/00list --- aptitude-0.4.11.11/debian/patches/00list +++ aptitude-0.4.11.11/debian/patches/00list @@ -6,0 +7 @@ +13_screensize.dpatch only in patch2: unchanged: --- aptitude-0.4.11.11.orig/debian/patches/13_screensize.dpatch +++ aptitude-0.4.11.11/debian/patches/13_screensize.dpatch @@ -0,0 +1,46 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 13_screensize.dpatch by Jean-Louis Dupond <i...@dupondje.be> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixes a bug that stops outputting aptitude downloads on big screens + + +...@dpatch@ +diff -urNad aptitude-0.4.11.11~/src/generic/apt/acqprogress.cc aptitude-0.4.11.11/src/generic/apt/acqprogress.cc +--- aptitude-0.4.11.11~/src/generic/apt/acqprogress.cc 2008-11-20 04:17:12.000000000 +0100 ++++ aptitude-0.4.11.11/src/generic/apt/acqprogress.cc 2010-02-08 18:49:10.252200871 +0100 +@@ -33,11 +33,13 @@ + AcqTextStatus::AcqTextStatus(unsigned int &ScreenWidth,unsigned int Quiet) : + ScreenWidth(ScreenWidth), Quiet(Quiet) + { ++ BlankLine = new char[ScreenWidth]; + } + + + AcqTextStatus::~AcqTextStatus() + { ++ delete[] BlankLine; + } + + /*}}}*/ +@@ -256,7 +258,7 @@ + + if (CurrentCPS != 0) + { +- char Tmp[300]; ++ char Tmp[ScreenWidth]; + unsigned long ETA = (unsigned long)((TotalBytes - CurrentBytes)/CurrentCPS); + sprintf(Tmp," %sB/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str()); + unsigned int Len = strlen(Buffer); +diff -urNad aptitude-0.4.11.11~/src/generic/apt/acqprogress.h aptitude-0.4.11.11/src/generic/apt/acqprogress.h +--- aptitude-0.4.11.11~/src/generic/apt/acqprogress.h 2008-11-20 04:17:12.000000000 +0100 ++++ aptitude-0.4.11.11/src/generic/apt/acqprogress.h 2010-02-08 18:49:29.843642235 +0100 +@@ -20,7 +20,7 @@ + class AcqTextStatus : public sigc::trackable + { + unsigned int &ScreenWidth; +- char BlankLine[300]; ++ char *BlankLine; + unsigned long ID; + unsigned long Quiet; +