[Aptitude-svn-commit] r3694 - in branches/aptitude-0.3/aptitude: . src/generic

Daniel Burrows dburrows at costa.debian.org
Tue Jul 26 05:12:06 UTC 2005


Author: dburrows
Date: Tue Jul 26 05:12:04 2005
New Revision: 3694

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/tags.cc
Log:
Fix scanning tags from the Packages file.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Jul 26 05:12:04 2005
@@ -1,5 +1,12 @@
 2005-07-25  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/tasks.cc:
+
+	  For some reason, pkgTagSection.Scan() requires one more than the
+	  length of the section to work properly.  Either that or GetRec
+	  returns an inclusive range.  Either way, parsing tags from the
+	  Packages file should work now.
+
 	* src/generic/tags.cc, src/generic/tags.h, src/generic/tests/test_tags.cc:
 
 	  Keep a local copy of the data for each tag and tag list.

Modified: branches/aptitude-0.3/aptitude/src/generic/tags.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/tags.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/tags.cc	Tue Jul 26 05:12:04 2005
@@ -158,7 +158,7 @@
   apt_package_records->Lookup(vf).GetRec(recstart, recend);
   if(!recstart || !recend)
     return;
-  if(!sec.Scan(recstart, recend-recstart))
+  if(!sec.Scan(recstart, recend-recstart+1))
     return;
 
   if(!sec.Find("Tag", tagstart, tagend))



More information about the Aptitude-svn-commit mailing list