Просмотр исходного кода

Fix never-ending loop in apt-get install -V.
Author: doogie
Date: 2003-05-19 17:30:12 GMT
Fix never-ending loop in apt-get install -V.

Arch Librarian лет назад: 22
Родитель
Сommit
03b9be8095
2 измененных файлов с 6 добавлено и 2 удалено
  1. 5 2
      cmdline/apt-get.cc
  2. 1 0
      debian/changelog

+ 5 - 2
cmdline/apt-get.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
-// $Id: apt-get.cc,v 1.129 2003/04/27 05:59:33 doogie Exp $
+// $Id: apt-get.cc,v 1.130 2003/05/19 17:30:12 doogie Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -182,7 +182,10 @@ bool ShowList(ostream &out,string Title,string List,string VersionsList)
          out << "   " << string(List,Start,End - Start) << " (" << 
             string(VersionsList,VersionsStart,VersionsEnd - VersionsStart) << 
             ")" << endl;
-         
+
+	 if (End == string::npos || End < Start)
+	    End = Start + ScreenWidth;
+
          Start = End + 1;
          VersionsStart = VersionsEnd + 1;
       } else {

+ 1 - 0
debian/changelog

@@ -5,6 +5,7 @@ apt (0.5.5.1) unstable; urgency=low
   * Fix api breakage that broke apt-ftparchive and apt-cache dumpavail, by
     backing out change that incorretly attempted to handle Package sections
     larger than 32k.  Closes: #192373
+  * Fix never-ending loop with apt-get install -V.  Closes: #192355.
 
  -- Adam Heath <doogie@debian.org>  Mon, 19 May 2003 11:53:49 -0500