[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#793360: apt: APT::Never-MarkAuto-Sections not working as advertised



For the record, Raphael's patch is buggy and causes segfaults in some
corner cases.  You can see https://pad.lv/1480592 for more details.

A more correct patch that passes my auto-removal testcases and doesn't
exhibit the segv follows:

--- apt-1.0.1ubuntu2.8/apt-pkg/depcache.cc	2015-04-28 01:00:42.000000000 -0600
+++ apt-1.0.1ubuntu2.10/apt-pkg/depcache.cc	2015-08-01 12:23:24.000000000 -0600
@@ -1225,7 +1225,8 @@
 	       continue;
 	    }
 	    // now check if we should consider it a automatic dependency or not
-	    if(InstPkg->CurrentVer == 0 && InstVer->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", InstVer.Section()))
+	    if(InstPkg->CurrentVer == 0 && P.InstVerIter(*this)->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", P.InstVerIter(*this).Section()))
+
 	    {
 	       if(DebugAutoInstall == true)
 		  std::clog << OutputInDepth(Depth) << "Setting NOT as auto-installed (direct "

... Adam


Reply to: