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

* merged from the auto-mark branch
* uploaded

Michael Vogt лет назад: 20
Родитель
Сommit
eeb38a9afa
3 измененных файлов с 22 добавлено и 4 удалено
  1. 11 3
      apt-pkg/depcache.cc
  2. 1 1
      configure.in
  3. 10 0
      debian/changelog

+ 11 - 3
apt-pkg/depcache.cc

@@ -715,9 +715,18 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser)
    // We dont even try to keep virtual packages..
    if (Pkg->VersionList == 0)
       return;
-   
+
+#if 0 // reseting the autoflag here means we lose the 
+      // auto-mark information if a user selects a package for removal
+      // but changes  his mind then and sets it for keep again
+      // - this makes sense as default when all Garbage dependencies
+      //   are automatically marked for removal (as aptitude does).
+      //   setting a package for keep then makes it no longer autoinstalled
+      //   for all other use-case this action is rather suprising
    if(FromUser && !P.Marked)
      P.Flags &= ~Flag::Auto;
+#endif
+
    RemoveSizes(Pkg);
    RemoveStates(Pkg);
 
@@ -1316,8 +1325,7 @@ bool pkgDepCache::Sweep()
      StateCache &state=PkgState[p->ID];
 
      // if it is not marked and it is installed, it's garbage 
-     if(!state.Marked && (!p.CurrentVer().end() || state.Install()) &&
-	!state.Delete())
+     if(!state.Marked && (!p.CurrentVer().end() || state.Install()))
      {
 	state.Garbage=true;
 	if(_config->FindB("Debug::pkgAutoRemove",false))

+ 1 - 1
configure.in

@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.45ubuntu11")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.45ubuntu12")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)

+ 10 - 0
debian/changelog

@@ -1,3 +1,13 @@
+apt (0.6.45ubuntu12) edgy; urgency=low
+
+  * apt-pkg/depcache.cc:
+    - fix in the sweep() code, set garbage flag for packages scheduled 
+      for removal too
+    - do not change the autoFlag in MarkKeep(), this can lead to suprising
+      side effects
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 21 Sep 2006 00:58:24 +0200
+
 apt (0.6.45ubuntu11) edgy; urgency=low
 
   * removed "installtask" and change it so that tasknames can be given