Преглед изворни кода

* ported/cleaned up the "Automatic dependency handling" patch from Michael Hofmann

Michael Vogt пре 21 година
родитељ
комит
afb1e2e3bb
8 измењених фајлова са 285 додато и 53 уклоњено
  1. 1 1
      apt-pkg/deb/dpkgpm.h
  2. 48 2
      apt-pkg/depcache.cc
  3. 6 0
      apt-pkg/depcache.h
  4. 1 0
      apt-pkg/pkgcache.h
  5. 2 0
      apt-pkg/pkgcachegen.cc
  6. 159 0
      cmdline/apt-get.cc
  7. 1 1
      configure.in
  8. 67 49
      po/apt-all.pot

+ 1 - 1
apt-pkg/deb/dpkgpm.h

@@ -40,7 +40,7 @@ class pkgDPkgPM : public pkgPackageManager
    bool RunScripts(const char *Cnf);
    bool RunScripts(const char *Cnf);
    bool RunScriptsWithPkgs(const char *Cnf);
    bool RunScriptsWithPkgs(const char *Cnf);
    bool SendV2Pkgs(FILE *F);
    bool SendV2Pkgs(FILE *F);
-   
+
    // The Actuall installation implementation
    // The Actuall installation implementation
    virtual bool Install(PkgIterator Pkg,string File);
    virtual bool Install(PkgIterator Pkg,string File);
    virtual bool Configure(PkgIterator Pkg);
    virtual bool Configure(PkgIterator Pkg);

+ 48 - 2
apt-pkg/depcache.cc

@@ -16,6 +16,10 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/algorithms.h>
+
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/tagfile.h>
     
     
 #include <apti18n.h>    
 #include <apti18n.h>    
 									/*}}}*/
 									/*}}}*/
@@ -72,7 +76,10 @@ bool pkgDepCache::Init(OpProgress *Prog)
       // Find the proper cache slot
       // Find the proper cache slot
       StateCache &State = PkgState[I->ID];
       StateCache &State = PkgState[I->ID];
       State.iFlags = 0;
       State.iFlags = 0;
-      
+      State.DirtyState = pkgCache::State::RemoveUnknown;
+      //State.AutomaticRemove = I->AutomaticRemove;
+      State.AutomaticRemove = pkgCache::State::RemoveUnknown;
+
       // Figure out the install version
       // Figure out the install version
       State.CandidateVer = GetCandidateVer(I);
       State.CandidateVer = GetCandidateVer(I);
       State.InstallVer = I.CurrentVer();
       State.InstallVer = I.CurrentVer();
@@ -447,6 +454,35 @@ void pkgDepCache::Update(OpProgress *Prog)
       AddStates(I);
       AddStates(I);
    }
    }
 
 
+   // read the state file ------------------------------
+   FileFd state_file;
+   string state = _config->FindDir("Dir::State") + "pkgstates";
+   if(FileExists(state)) {
+      state_file.Open(state, FileFd::ReadOnly);
+      int file_size = state_file.Size();
+      Prog->OverallProgress(0, file_size, 1, _("Reading extended state information"));
+
+      pkgTagFile tagfile(&state_file);
+      pkgTagSection section;
+      int amt=0;
+      while(tagfile.Step(section)) {
+	 string pkgname = section.FindS("Package");
+	 pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname);
+	 // Silently ignore unknown packages and packages with no actual
+	 // version.
+	 if(!pkg.end() && !pkg.VersionList().end()) {
+	    short reason = section.FindI("Remove-Reason", pkgCache::State::RemoveManual);
+	    PkgState[pkg->ID].AutomaticRemove = reason;
+	    //std::cout << "Set: " << pkgname << " to " << reason << std::endl;
+	    amt+=section.size();
+	    Prog->OverallProgress(amt, file_size, 1, _("Reading extended state information"));
+	 }
+	 Prog->OverallProgress(file_size, file_size, 1, _("Reading extended state information"));
+      }
+   }
+   //--------------------------------------
+
+
    if (Prog != 0)      
    if (Prog != 0)      
       Prog->Progress(Done);
       Prog->Progress(Done);
 }
 }
@@ -582,7 +618,8 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge)
    else
    else
       P.Mode = ModeDelete;
       P.Mode = ModeDelete;
    P.InstallVer = 0;
    P.InstallVer = 0;
-   P.Flags &= Flag::Auto;
+   // This was not inverted before, but I think it should be
+   P.Flags &= ~Flag::Auto;
 
 
    AddStates(Pkg);   
    AddStates(Pkg);   
    Update(Pkg);
    Update(Pkg);
@@ -754,6 +791,15 @@ void pkgDepCache::SetReInstall(PkgIterator const &Pkg,bool To)
    AddSizes(Pkg);
    AddSizes(Pkg);
 }
 }
 									/*}}}*/
 									/*}}}*/
+// DepCache::SetDirty - Switch the package between dirty states		/*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgDepCache::SetDirty(PkgIterator const &Pkg, pkgCache::State::PkgRemoveState To)
+{
+   StateCache &P = PkgState[Pkg->ID];
+   P.DirtyState = To;
+}
+									/*}}}*/
 // DepCache::SetCandidateVersion - Change the candidate version		/*{{{*/
 // DepCache::SetCandidateVersion - Change the candidate version		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */

+ 6 - 0
apt-pkg/depcache.h

@@ -79,6 +79,10 @@ class pkgDepCache : protected pkgCache::Namespace
       unsigned short Flags;
       unsigned short Flags;
       unsigned short iFlags;           // Internal flags
       unsigned short iFlags;           // Internal flags
 
 
+      // Traversal status and state for automatic removal
+      unsigned char DirtyState;
+      unsigned char AutomaticRemove;
+
       // Various tree indicators
       // Various tree indicators
       signed char Status;              // -1,0,1,2
       signed char Status;              // -1,0,1,2
       unsigned char Mode;              // ModeList
       unsigned char Mode;              // ModeList
@@ -99,6 +103,7 @@ class pkgDepCache : protected pkgCache::Namespace
       inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;};
       inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;};
       inline bool InstBroken() const {return (DepState & DepInstMin) != DepInstMin;};
       inline bool InstBroken() const {return (DepState & DepInstMin) != DepInstMin;};
       inline bool Install() const {return Mode == ModeInstall;};
       inline bool Install() const {return Mode == ModeInstall;};
+      inline unsigned char Dirty() const {return DirtyState;};
       inline VerIterator InstVerIter(pkgCache &Cache)
       inline VerIterator InstVerIter(pkgCache &Cache)
                 {return VerIterator(Cache,InstallVer);};
                 {return VerIterator(Cache,InstallVer);};
       inline VerIterator CandidateVerIter(pkgCache &Cache)
       inline VerIterator CandidateVerIter(pkgCache &Cache)
@@ -189,6 +194,7 @@ class pkgDepCache : protected pkgCache::Namespace
 		    unsigned long Depth = 0);
 		    unsigned long Depth = 0);
    void SetReInstall(PkgIterator const &Pkg,bool To);
    void SetReInstall(PkgIterator const &Pkg,bool To);
    void SetCandidateVersion(VerIterator TargetVer);
    void SetCandidateVersion(VerIterator TargetVer);
+   void SetDirty(PkgIterator const &Pkg, pkgCache::State::PkgRemoveState To);
    
    
    // This is for debuging
    // This is for debuging
    void Update(OpProgress *Prog = 0);
    void Update(OpProgress *Prog = 0);

+ 1 - 0
apt-pkg/pkgcache.h

@@ -75,6 +75,7 @@ class pkgCache
       enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3};
       enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3};
       enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2,
       enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2,
 	   HalfInstalled=4,ConfigFiles=5,Installed=6};
 	   HalfInstalled=4,ConfigFiles=5,Installed=6};
+      enum PkgRemoveState {RemoveUnknown=0, RemoveManual=1,RemoveSuggested=2,RemoveRecommended=3,RemoveRequired=4};
    };
    };
    
    
    struct Flag
    struct Flag

+ 2 - 0
apt-pkg/pkgcachegen.cc

@@ -26,6 +26,8 @@
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/pkgsystem.h>
 
 
+#include <apt-pkg/tagfile.h>
+
 #include <apti18n.h>
 #include <apti18n.h>
 
 
 #include <vector>
 #include <vector>

+ 159 - 0
cmdline/apt-get.cc

@@ -58,6 +58,7 @@
 #include <errno.h>
 #include <errno.h>
 #include <regex.h>
 #include <regex.h>
 #include <sys/wait.h>
 #include <sys/wait.h>
+#include <sstream>
 									/*}}}*/
 									/*}}}*/
 
 
 using namespace std;
 using namespace std;
@@ -992,6 +993,26 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
 	 cerr << _("Unable to correct missing packages.") << endl;
 	 cerr << _("Unable to correct missing packages.") << endl;
 	 return _error->Error(_("Aborting install."));
 	 return _error->Error(_("Aborting install."));
       }
       }
+
+      // write the auto-mark list ----------------------------------
+      // -- we do it here because there is no libapt::Commit() :/
+      FileFd state_file;
+      string state = _config->FindDir("Dir::State") + "pkgstates";
+
+
+      state_file.Open(state, FileFd::WriteEmpty);
+      std::ostringstream ostr;
+      for(pkgCache::PkgIterator p=Cache->PkgBegin(); !p.end();p++) {
+	 if(Cache[p].AutomaticRemove != pkgCache::State::RemoveUnknown) {
+	    ostr.str(string(""));
+	    ostr << "Package: " << p.Name()
+		 << "\nRemove-Reason: "
+		 << (int)(Cache[p].AutomaticRemove) << "\n\n";
+	    state_file.Write(ostr.str().c_str(), ostr.str().size());
+	    //std::cout << "Writing auto-mark: " << ostr.str() << endl;
+	 }
+      }
+      // ----------------------------------------------------------
        	 
        	 
       _system->UnLock();
       _system->UnLock();
       pkgPackageManager::OrderResult Res = PM->DoInstall();
       pkgPackageManager::OrderResult Res = PM->DoInstall();
@@ -1375,6 +1396,135 @@ bool DoUpgrade(CommandLine &CmdL)
    return InstallPackages(Cache,true);
    return InstallPackages(Cache,true);
 }
 }
 									/*}}}*/
 									/*}}}*/
+// RecurseDirty - Mark used packages as dirty				/*{{{*/
+// ---------------------------------------------------------------------
+/* Mark all reachable packages as dirty. */
+void RecurseDirty (CacheFile &Cache, pkgCache::PkgIterator Pkg, pkgCache::State::PkgRemoveState DirtLevel)
+{
+   // If it is not installed, and we are in manual mode, ignore it
+   if ((Pkg->CurrentVer == 0 && Cache[Pkg].Install() == false || Cache[Pkg].Delete() == true) &&
+       DirtLevel == pkgCache::State::RemoveManual) 
+   {
+//      fprintf(stdout,"This one is not installed/virtual %s %d %d\n", Pkg.Name(), Pkg->AutomaticRemove, DirtLevel);
+      return;
+   }
+
+   // If it is not installed, and it is not virtual, ignore it
+   if ((Pkg->CurrentVer == 0 && Cache[Pkg].Install() == false || Cache[Pkg].Delete() == true) &&
+       Pkg->VersionList != 0)
+   {
+//      fprintf(stdout,"This one is not installed %s %d %d\n", Pkg.Name(), Pkg->AutomaticRemove, DirtLevel);
+      return;
+   }
+
+   // If it is similar or more dirty than we are ;-), because we've been here already, don't mark it
+   // This is necessary because virtual packages just relay the current level,
+   // so it may be possible e.g. that this was already seen with ::RemoveSuggested, but
+   // we are ::RemoveRequired
+   if (Cache[Pkg].Dirty() >= DirtLevel) 
+   {
+      //fprintf(stdout,"Seen already %s %d %d\n", Pkg.Name(), Pkg->AutomaticRemove, DirtLevel);
+      return;
+   }
+   
+   // If it is less important than the current DirtLevel, don't mark it
+   if (Cache[Pkg].AutomaticRemove != pkgCache::State::RemoveManual && 
+      Cache[Pkg].AutomaticRemove > DirtLevel) 
+   {
+//       fprintf(stdout,"We don't need %s %d %d %d\n", Pkg.Name(), Pkg->AutomaticRemove, DirtLevel, Cache[Pkg].Dirty());
+       return;
+   }
+
+   // Mark it as used
+   Cache->SetDirty(Pkg, DirtLevel);
+       
+   //fprintf(stdout,"We keep %s %d %d\n", Pkg.Name(), Pkg->AutomaticRemove, DirtLevel);
+
+   // We are a virtual package
+   if (Pkg->VersionList == 0)
+   {
+//      fprintf(stdout,"We are virtual %s %d %d\n", Pkg.Name(), Pkg->AutomaticRemove, DirtLevel);
+      for (pkgCache::PrvIterator Prv = Pkg.ProvidesList(); ! Prv.end(); ++Prv)
+	 RecurseDirty (Cache, Prv.OwnerPkg(), DirtLevel);
+      return;
+   }
+
+   // Depending on the type of dependency, follow it
+   for (pkgCache::DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList(); ! D.end(); ++D) 
+   {
+//      fprintf(stdout,"We depend on %s %s\n", D.TargetPkg().Name(), D.DepType());
+
+      switch(D->Type) 
+      {
+	 case pkgCache::Dep::Depends:
+	 case pkgCache::Dep::PreDepends:
+	    RecurseDirty (Cache, D.TargetPkg(), pkgCache::State::RemoveRequired);
+	    break;
+	 case pkgCache::Dep::Recommends:
+            RecurseDirty (Cache, D.TargetPkg(), pkgCache::State::RemoveRecommended);
+	    break;
+         case pkgCache::Dep::Suggests:
+            RecurseDirty (Cache, D.TargetPkg(), pkgCache::State::RemoveSuggested);
+	    break;
+	 case pkgCache::Dep::Conflicts:
+	 case pkgCache::Dep::Replaces:
+	 case pkgCache::Dep::Obsoletes:
+	    // We don't handle these here
+	    break;
+      }
+   }
+//   fprintf(stdout,"We keep %s %d %d <END>\n", Pkg.Name(), Pkg->AutomaticRemove, DirtLevel);
+}
+									/*}}}*/
+// DoAutomaticRemove - Remove all automatic unused packages		/*{{{*/
+// ---------------------------------------------------------------------
+/* Remove unused automatic packages */
+bool DoAutomaticRemove(CacheFile &Cache)
+{
+   std::cout << "DoAutomaticRemove()" << std::endl;
+   for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg)
+      if(!Cache[Pkg].Dirty() && Cache[Pkg].AutomaticRemove > 0)
+	 std::cout << "has auto-remove information: " << Pkg.Name() 
+		   << " " << (int)Cache[Pkg].AutomaticRemove 
+		   << std::endl;
+
+
+   if (_config->FindB("APT::Get::Remove",true) == false)
+      return _error->Error(_("We are not supposed to delete stuff, can't start AutoRemover"));
+
+   for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg)
+      Cache->SetDirty(Pkg, pkgCache::State::RemoveUnknown);
+
+   for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg) 
+      RecurseDirty (Cache, Pkg, pkgCache::State::RemoveManual);
+   
+
+
+   for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg)
+   {
+      if (! Cache[Pkg].Dirty() &&
+          (Pkg->CurrentVer != 0 && Cache[Pkg].Install() == false && Cache[Pkg].Delete() == false))
+      {
+         fprintf(stdout,"We could delete %s %d\n", Pkg.Name(), Cache[Pkg].AutomaticRemove);
+         Cache->MarkDelete(Pkg,_config->FindB("APT::Get::Purge",false));
+      }
+   }
+
+   // Now see if we destroyed anything
+   if (Cache->BrokenCount() != 0)
+   {
+      c1out << _("Hmm, seems like the AutoRemover destroyed something which really\n"
+	         "shouldn't happen. Please file a bug report against apt.") << endl;
+      c1out << endl;
+      c1out << _("The following information may help to resolve the situation:") << endl;
+      c1out << endl;
+      ShowBroken(c1out,Cache,false);
+
+      return _error->Error(_("Internal Error, AutoRemover broke stuff"));
+   }
+   return true;
+}
+									/*}}}*/
 // DoInstall - Install packages from the command line			/*{{{*/
 // DoInstall - Install packages from the command line			/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* Install named packages */
 /* Install named packages */
@@ -1546,6 +1696,11 @@ bool DoInstall(CommandLine &CmdL)
       return _error->Error(_("Broken packages"));
       return _error->Error(_("Broken packages"));
    }   
    }   
    
    
+   //if (_config->FindB("APT::Get::AutomaticRemove")) {
+      if (!DoAutomaticRemove(Cache)) 
+	 return false;
+   //}
+
    /* Print out a list of packages that are going to be installed extra
    /* Print out a list of packages that are going to be installed extra
       to what the user asked */
       to what the user asked */
    if (Cache->InstCount() != ExpectedInst)
    if (Cache->InstCount() != ExpectedInst)
@@ -1565,6 +1720,8 @@ bool DoInstall(CommandLine &CmdL)
 	 
 	 
 	 if (*J == 0) {
 	 if (*J == 0) {
 	    List += string(I.Name()) + " ";
 	    List += string(I.Name()) + " ";
+	    //if (_config->FindB("APT::Get::AutomaticRemove"))
+	       Cache[I].AutomaticRemove = pkgCache::State::RemoveRequired;
         VersionsList += string(Cache[I].CandVersion) + "\n";
         VersionsList += string(Cache[I].CandVersion) + "\n";
      }
      }
       }
       }
@@ -2410,6 +2567,7 @@ void GetInitialize()
    _config->Set("APT::Get::Fix-Broken",false);
    _config->Set("APT::Get::Fix-Broken",false);
    _config->Set("APT::Get::Force-Yes",false);
    _config->Set("APT::Get::Force-Yes",false);
    _config->Set("APT::Get::List-Cleanup",true);
    _config->Set("APT::Get::List-Cleanup",true);
+   _config->Set("APT::Get::AutomaticRemove",false);
 }
 }
 									/*}}}*/
 									/*}}}*/
 // SigWinch - Window size change signal handler				/*{{{*/
 // SigWinch - Window size change signal handler				/*{{{*/
@@ -2465,6 +2623,7 @@ int main(int argc,const char *argv[])
       {0,"remove","APT::Get::Remove",0},
       {0,"remove","APT::Get::Remove",0},
       {0,"only-source","APT::Get::Only-Source",0},
       {0,"only-source","APT::Get::Only-Source",0},
       {0,"arch-only","APT::Get::Arch-Only",0},
       {0,"arch-only","APT::Get::Arch-Only",0},
+      {0,"experimental-automatic-remove","APT::Get::AutomaticRemove",0},
       {0,"allow-unauthenticated","APT::Get::AllowUnauthenticated",0},
       {0,"allow-unauthenticated","APT::Get::AllowUnauthenticated",0},
       {'c',"config-file",0,CommandLine::ConfigFile},
       {'c',"config-file",0,CommandLine::ConfigFile},
       {'o',"option",0,CommandLine::ArbItem},
       {'o',"option",0,CommandLine::ArbItem},

+ 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)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 
 dnl -- SET THIS TO THE RELEASE VERSION --
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.35ubuntu1")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.36")
 PACKAGE="apt"
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
 AC_SUBST(PACKAGE)

+ 67 - 49
po/apt-all.pot

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-04-06 13:03+0200\n"
+"POT-Creation-Date: 2005-05-09 19:02+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -148,7 +148,7 @@ msgstr ""
 
 
 #: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
 #: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
-#: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
+#: cmdline/apt-get.cc:2438 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
 msgid "%s %s for %s %s compiled on %s %s\n"
 msgid "%s %s for %s %s compiled on %s %s\n"
 msgstr ""
 msgstr ""
@@ -523,7 +523,7 @@ msgstr ""
 msgid "Y"
 msgid "Y"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:140 cmdline/apt-get.cc:1475
+#: cmdline/apt-get.cc:140 cmdline/apt-get.cc:1594
 #, c-format
 #, c-format
 msgid "Regex compilation error - %s"
 msgid "Regex compilation error - %s"
 msgstr ""
 msgstr ""
@@ -670,11 +670,11 @@ msgstr ""
 msgid "Packages need to be removed but remove is disabled."
 msgid "Packages need to be removed but remove is disabled."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:788 cmdline/apt-get.cc:1769 cmdline/apt-get.cc:1802
+#: cmdline/apt-get.cc:788 cmdline/apt-get.cc:1894 cmdline/apt-get.cc:1927
 msgid "Unable to lock the download directory"
 msgid "Unable to lock the download directory"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:798 cmdline/apt-get.cc:1850 cmdline/apt-get.cc:2061
+#: cmdline/apt-get.cc:798 cmdline/apt-get.cc:1975 cmdline/apt-get.cc:2186
 #: apt-pkg/cachefile.cc:67
 #: apt-pkg/cachefile.cc:67
 msgid "The list of sources could not be read."
 msgid "The list of sources could not be read."
 msgstr ""
 msgstr ""
@@ -728,7 +728,7 @@ msgstr ""
 msgid "Do you want to continue [Y/n]? "
 msgid "Do you want to continue [Y/n]? "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:958 cmdline/apt-get.cc:1334 cmdline/apt-get.cc:1959
+#: cmdline/apt-get.cc:958 cmdline/apt-get.cc:1334 cmdline/apt-get.cc:2084
 #, c-format
 #, c-format
 msgid "Failed to fetch %s  %s\n"
 msgid "Failed to fetch %s  %s\n"
 msgstr ""
 msgstr ""
@@ -737,7 +737,7 @@ msgstr ""
 msgid "Some files failed to download"
 msgid "Some files failed to download"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:977 cmdline/apt-get.cc:1968
+#: cmdline/apt-get.cc:977 cmdline/apt-get.cc:2093
 msgid "Download complete and in download only mode"
 msgid "Download complete and in download only mode"
 msgstr ""
 msgstr ""
 
 
@@ -847,27 +847,45 @@ msgstr ""
 msgid "Internal error, AllUpgrade broke stuff"
 msgid "Internal error, AllUpgrade broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1462 cmdline/apt-get.cc:1498
+#: cmdline/apt-get.cc:1464
+msgid "We are not supposed to delete stuff, can't start AutoRemover"
+msgstr ""
+
+#: cmdline/apt-get.cc:1485
+msgid ""
+"Hmm, seems like the AutoRemover destroyed something which really\n"
+"shouldn't happen. Please file a bug report against apt."
+msgstr ""
+
+#: cmdline/apt-get.cc:1488 cmdline/apt-get.cc:1662
+msgid "The following information may help to resolve the situation:"
+msgstr ""
+
+#: cmdline/apt-get.cc:1492
+msgid "Internal Error, AutoRemover broke stuff"
+msgstr ""
+
+#: cmdline/apt-get.cc:1581 cmdline/apt-get.cc:1617
 #, c-format
 #, c-format
 msgid "Couldn't find package %s"
 msgid "Couldn't find package %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1485
+#: cmdline/apt-get.cc:1604
 #, c-format
 #, c-format
 msgid "Note, selecting %s for regex '%s'\n"
 msgid "Note, selecting %s for regex '%s'\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1515
+#: cmdline/apt-get.cc:1634
 msgid "You might want to run `apt-get -f install' to correct these:"
 msgid "You might want to run `apt-get -f install' to correct these:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1518
+#: cmdline/apt-get.cc:1637
 msgid ""
 msgid ""
 "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
 "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
 "solution)."
 "solution)."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1530
+#: cmdline/apt-get.cc:1649
 msgid ""
 msgid ""
 "Some packages could not be installed. This may mean that you have\n"
 "Some packages could not be installed. This may mean that you have\n"
 "requested an impossible situation or if you are using the unstable\n"
 "requested an impossible situation or if you are using the unstable\n"
@@ -875,149 +893,145 @@ msgid ""
 "or been moved out of Incoming."
 "or been moved out of Incoming."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1538
+#: cmdline/apt-get.cc:1657
 msgid ""
 msgid ""
 "Since you only requested a single operation it is extremely likely that\n"
 "Since you only requested a single operation it is extremely likely that\n"
 "the package is simply not installable and a bug report against\n"
 "the package is simply not installable and a bug report against\n"
 "that package should be filed."
 "that package should be filed."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1543
-msgid "The following information may help to resolve the situation:"
-msgstr ""
-
-#: cmdline/apt-get.cc:1546
+#: cmdline/apt-get.cc:1665
 msgid "Broken packages"
 msgid "Broken packages"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1572
+#: cmdline/apt-get.cc:1697
 msgid "The following extra packages will be installed:"
 msgid "The following extra packages will be installed:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1643
+#: cmdline/apt-get.cc:1768
 msgid "Suggested packages:"
 msgid "Suggested packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1644
+#: cmdline/apt-get.cc:1769
 msgid "Recommended packages:"
 msgid "Recommended packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1664
+#: cmdline/apt-get.cc:1789
 msgid "Calculating upgrade... "
 msgid "Calculating upgrade... "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1667 methods/ftp.cc:702 methods/connect.cc:99
+#: cmdline/apt-get.cc:1792 methods/ftp.cc:702 methods/connect.cc:99
 msgid "Failed"
 msgid "Failed"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1672
+#: cmdline/apt-get.cc:1797
 msgid "Done"
 msgid "Done"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1845
+#: cmdline/apt-get.cc:1970
 msgid "Must specify at least one package to fetch source for"
 msgid "Must specify at least one package to fetch source for"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1872 cmdline/apt-get.cc:2079
+#: cmdline/apt-get.cc:1997 cmdline/apt-get.cc:2204
 #, c-format
 #, c-format
 msgid "Unable to find a source package for %s"
 msgid "Unable to find a source package for %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1919
+#: cmdline/apt-get.cc:2044
 #, c-format
 #, c-format
 msgid "You don't have enough free space in %s"
 msgid "You don't have enough free space in %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1924
+#: cmdline/apt-get.cc:2049
 #, c-format
 #, c-format
 msgid "Need to get %sB/%sB of source archives.\n"
 msgid "Need to get %sB/%sB of source archives.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1927
+#: cmdline/apt-get.cc:2052
 #, c-format
 #, c-format
 msgid "Need to get %sB of source archives.\n"
 msgid "Need to get %sB of source archives.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1933
+#: cmdline/apt-get.cc:2058
 #, c-format
 #, c-format
 msgid "Fetch source %s\n"
 msgid "Fetch source %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1964
+#: cmdline/apt-get.cc:2089
 msgid "Failed to fetch some archives."
 msgid "Failed to fetch some archives."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1992
+#: cmdline/apt-get.cc:2117
 #, c-format
 #, c-format
 msgid "Skipping unpack of already unpacked source in %s\n"
 msgid "Skipping unpack of already unpacked source in %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2004
+#: cmdline/apt-get.cc:2129
 #, c-format
 #, c-format
 msgid "Unpack command '%s' failed.\n"
 msgid "Unpack command '%s' failed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2021
+#: cmdline/apt-get.cc:2146
 #, c-format
 #, c-format
 msgid "Build command '%s' failed.\n"
 msgid "Build command '%s' failed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2040
+#: cmdline/apt-get.cc:2165
 msgid "Child process failed"
 msgid "Child process failed"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2056
+#: cmdline/apt-get.cc:2181
 msgid "Must specify at least one package to check builddeps for"
 msgid "Must specify at least one package to check builddeps for"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2084
+#: cmdline/apt-get.cc:2209
 #, c-format
 #, c-format
 msgid "Unable to get build-dependency information for %s"
 msgid "Unable to get build-dependency information for %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2104
+#: cmdline/apt-get.cc:2229
 #, c-format
 #, c-format
 msgid "%s has no build depends.\n"
 msgid "%s has no build depends.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2156
+#: cmdline/apt-get.cc:2281
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "%s dependency for %s cannot be satisfied because the package %s cannot be "
 "%s dependency for %s cannot be satisfied because the package %s cannot be "
 "found"
 "found"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2208
+#: cmdline/apt-get.cc:2333
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "%s dependency for %s cannot be satisfied because no available versions of "
 "%s dependency for %s cannot be satisfied because no available versions of "
 "package %s can satisfy version requirements"
 "package %s can satisfy version requirements"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2243
+#: cmdline/apt-get.cc:2368
 #, c-format
 #, c-format
 msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
 msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2268
+#: cmdline/apt-get.cc:2393
 #, c-format
 #, c-format
 msgid "Failed to satisfy %s dependency for %s: %s"
 msgid "Failed to satisfy %s dependency for %s: %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2282
+#: cmdline/apt-get.cc:2407
 #, c-format
 #, c-format
 msgid "Build-dependencies for %s could not be satisfied."
 msgid "Build-dependencies for %s could not be satisfied."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2286
+#: cmdline/apt-get.cc:2411
 msgid "Failed to process build dependencies"
 msgid "Failed to process build dependencies"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2318
+#: cmdline/apt-get.cc:2443
 msgid "Supported modules:"
 msgid "Supported modules:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2359
+#: cmdline/apt-get.cc:2484
 msgid ""
 msgid ""
 "Usage: apt-get [options] command\n"
 "Usage: apt-get [options] command\n"
 "       apt-get [options] install|remove pkg1 [pkg2 ...]\n"
 "       apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@ -2007,18 +2021,22 @@ msgstr ""
 msgid "extra"
 msgid "extra"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/depcache.cc:60 apt-pkg/depcache.cc:89
+#: apt-pkg/depcache.cc:64 apt-pkg/depcache.cc:95
 msgid "Building dependency tree"
 msgid "Building dependency tree"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/depcache.cc:61
+#: apt-pkg/depcache.cc:65
 msgid "Candidate versions"
 msgid "Candidate versions"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/depcache.cc:90
+#: apt-pkg/depcache.cc:96
 msgid "Dependency generation"
 msgid "Dependency generation"
 msgstr ""
 msgstr ""
 
 
+#: apt-pkg/depcache.cc:461 apt-pkg/depcache.cc:473 apt-pkg/depcache.cc:475
+msgid "Reading extended state information"
+msgstr ""
+
 #: apt-pkg/tagfile.cc:73
 #: apt-pkg/tagfile.cc:73
 #, c-format
 #, c-format
 msgid "Unable to parse package file %s (1)"
 msgid "Unable to parse package file %s (1)"