]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/packagemanager.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 2 Dec 2009 16:22:32 +0000 (17:22 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 2 Dec 2009 16:22:32 +0000 (17:22 +0100)
  - add output about pre-depends configuring when debug::pkgPackageManager
    is used
* methods/https.cc:
  - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972
    thanks to Brian Thomason for the patch
* apt-pkg/depcache.cc, apt-pkg/indexcopy.cc:
  - typo fix (LP: #462328)

* cmdline/apt-key:
  - Emit a warning if removed keys keyring is missing and skip associated
    checks (LP: #218971)

1  2 
apt-pkg/depcache.cc
apt-pkg/indexcopy.cc
apt-pkg/packagemanager.cc
debian/changelog
methods/https.cc

diff --combined apt-pkg/depcache.cc
index 228750b74cbbccf81df8005e554929e4b70d9c74,45e427d81aee3f33d497ad250ee66656658abec7..ec7a5de647b341aae15d02dfd8787242043c0adc
@@@ -243,7 -243,7 +243,7 @@@ bool pkgDepCache::writeStateFile(OpProg
            continue;
         bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto);
         if(_config->FindB("Debug::pkgAutoRemove",false))
-           std::clog << "Update exisiting AutoInstall info: " 
+           std::clog << "Update existing AutoInstall info: " 
                      << pkg.Name() << std::endl;
         TFRewriteData rewrite[2];
         rewrite[0].Tag = "Auto-Installed";
@@@ -823,7 -823,7 +823,7 @@@ void pkgDepCache::MarkDelete(PkgIterato
  bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
                              unsigned long Depth, bool FromUser)
  {
 -   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
 +   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold && _config->FindB("APT::Ignore-Hold",false) == false)
     {
        if (DebugMarker == true)
         std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl;
@@@ -1085,7 -1085,7 +1085,7 @@@ void pkgDepCache::MarkInstall(PkgIterat
  bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst,
                              unsigned long Depth, bool FromUser)
  {
 -   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
 +   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold && _config->FindB("APT::Ignore-Hold",false) == false)
     {
        if (DebugMarker == true)
         std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << " FU=" << FromUser << std::endl;
diff --combined apt-pkg/indexcopy.cc
index 0142d7dbee4a5add4b60d44fc9c08a298ecd2feb,e7bf046a4f580602fb3ac08329cc71c5151b2fa9..57c9f95caa8991949530b6b9bfb7f75a3ca74802
@@@ -527,19 -527,19 +527,19 @@@ bool SigVerify::Verify(string prefix, s
     // (non-existing files are not considered a error)
     if(!FileExists(prefix+file))
     {
-       _error->Warning("Skipping non-exisiting file %s", string(prefix+file).c_str());
+       _error->Warning(_("Skipping nonexistent file %s"), string(prefix+file).c_str());
        return true;
     }
  
     if (!Record) 
     {
-       _error->Warning("Can't find authentication record for: %s",file.c_str());
+       _error->Warning(_("Can't find authentication record for: %s"), file.c_str());
        return false;
     }
  
     if (!Record->Hash.VerifyFile(prefix+file))
     {
-       _error->Warning("Hash mismatch for: %s",file.c_str());
+       _error->Warning(_("Hash mismatch for: %s"),file.c_str());
        return false;
     }
  
@@@ -592,10 -592,7 +592,10 @@@ bool SigVerify::CopyAndVerify(string CD
  
        // a Release.gpg without a Release should never happen
        if(!FileExists(*I+"Release"))
 +      {
 +       delete MetaIndex;
         continue;
 +      }
  
  
        // verify the gpg signature of "Release"
index dbcd461acb3770996dde2d45a581c137f99839a4,019a1db1fc556ee555d7742bedc47c8da1a7567e..7be6e72f231e6d8d17150f13d4a6355eacdceccf
@@@ -57,10 -57,7 +57,10 @@@ bool pkgPackageManager::GetArchives(pkg
     if (CreateOrderList() == false)
        return false;
     
 -   if (List->OrderUnpack() == false)
 +   bool const ordering =
 +      _config->FindB("PackageManager::UnpackAll",true) ?
 +              List->OrderUnpack() : List->OrderCritical();
 +   if (ordering == false)
        return _error->Error("Internal ordering error");
  
     for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++)
@@@ -125,7 -122,7 +125,7 @@@ bool pkgPackageManager::FixMissing(
  /* This adds the immediate flag to the pkg and recursively to the
     dependendies 
   */
 -void pkgPackageManager::ImmediateAdd(PkgIterator I, bool UseInstallVer)
 +void pkgPackageManager::ImmediateAdd(PkgIterator I, bool UseInstallVer, unsigned const int &Depth)
  {
     DepIterator D;
     
     for ( /* nothing */  ; D.end() == false; D++)
        if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
        {
 +       // ignore dependencies if no instal/upgrade/remove is going to happen
 +       if (D.TargetPkg() == 0 || Cache[D.TargetPkg()].Keep())
 +            continue;
 +
         if(!List->IsFlag(D.TargetPkg(), pkgOrderList::Immediate))
         {
            if(Debug)
 -             clog << "ImmediateAdd(): Adding Immediate flag to " << I.Name() << endl;
 +             clog << OutputInDepth(Depth) << "ImmediateAdd(): Adding Immediate flag to " << D.TargetPkg() << " cause of " << D.DepType() << " " << I.Name() << endl;
            List->Flag(D.TargetPkg(),pkgOrderList::Immediate);
 -          ImmediateAdd(D.TargetPkg(), UseInstallVer);
 +          ImmediateAdd(D.TargetPkg(), UseInstallVer, Depth + 1);
         }
        }
     return;
@@@ -170,7 -163,7 +170,7 @@@ bool pkgPackageManager::CreateOrderList
     delete List;
     List = new pkgOrderList(&Cache);
     
 -   bool NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true);
 +   static bool const NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true);
     
     // Generate the list of affected packages and sort it
     for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
@@@ -273,16 -266,13 +273,16 @@@ bool pkgPackageManager::ConfigureAll(
     
     if (OList.OrderConfigure() == false)
        return false;
 -   
 +
 +   std::string const conf = _config->Find("PackageManager::Configure","all");
 +   bool const ConfigurePkgs = (conf == "all");
 +
     // Perform the configuring
     for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++)
     {
        PkgIterator Pkg(Cache,*I);
        
 -      if (Configure(Pkg) == false)
 +      if (ConfigurePkgs == true && Configure(Pkg) == false)
         return false;
        
        List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
     of it's dependents. */
  bool pkgPackageManager::SmartConfigure(PkgIterator Pkg)
  {
+    if (Debug == true)
+       clog << "SmartConfigure " << Pkg.Name() << endl;
     pkgOrderList OList(&Cache);
  
     if (DepAdd(OList,Pkg) == false)
        return false;
 -   
 -   if (OList.OrderConfigure() == false)
 -      return false;
 -   
 +
 +   static std::string const conf = _config->Find("PackageManager::Configure","all");
 +   static bool const ConfigurePkgs = (conf == "all" || conf == "smart");
 +
 +   if (ConfigurePkgs == true)
 +      if (OList.OrderConfigure() == false)
 +       return false;
 +
     // Perform the configuring
     for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++)
     {
        PkgIterator Pkg(Cache,*I);
        
 -      if (Debug == true)
 -       clog << "  SmartConfigure on" << Pkg.Name() << endl;
 -
 -      if (Configure(Pkg) == false)
 +      if (ConfigurePkgs == true && Configure(Pkg) == false)
         return false;
        
        List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
@@@ -491,6 -483,9 +494,9 @@@ bool pkgPackageManager::SmartUnPack(Pkg
        
        while (End->Type == pkgCache::Dep::PreDepends)
        {
+        if (Debug == true)
+           clog << "PreDepends order for " << Pkg.Name() << std::endl;
         // Look for possible ok targets.
         SPtrArray<Version *> VList = Start.AllTargets();
         bool Bad = true;
                Pkg.State() == PkgIterator::NeedsNothing)
            {
               Bad = false;
+              if (Debug == true)
+                 clog << "Found ok package " << Pkg.Name() << endl;
               continue;
            }
         }
                (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing))
               continue;
  
+           if (Debug == true)
+              clog << "Trying to SmartConfigure " << Pkg.Name() << endl;
            Bad = !SmartConfigure(Pkg);
         }
  
@@@ -591,12 -590,9 +601,12 @@@ pkgPackageManager::OrderResult pkgPacka
     Reset();
     
     if (Debug == true)
 -      clog << "Begining to order" << endl;
 +      clog << "Beginning to order" << endl;
  
 -   if (List->OrderUnpack(FileNames) == false)
 +   bool const ordering =
 +      _config->FindB("PackageManager::UnpackAll",true) ?
 +              List->OrderUnpack(FileNames) : List->OrderCritical();
 +   if (ordering == false)
     {
        _error->Error("Internal ordering error");
        return Failed;
            return Failed;
        DoneSomething = true;
     }
 -   
 +
     // Final run through the configure phase
     if (ConfigureAll() == false)
        return Failed;
diff --combined debian/changelog
index 6ffa8c33a9db17273c127661c2211e9120b5591c,417cd2436da6dbdeb6668d1158716d36c0219769..5cff0919ad30a2bdd6e454a18fd8530dfb0173f5
 -apt (0.7.22.4) unstable; urgency=low
 +apt (0.7.25) UNRELEASED; urgency=low
  
 +  [ Christian Perrier ]
 +  * Fix apt-ftparchive(1) wrt description of the "-o" option.
 +    Thanks to Dann Frazier for the patch. Closes: #273100
 +  * po/LINGUAS. Re-disable Hebrew. Closes: #534992
 +  * po/LINGUAS. Enable Asturian and Lithuanian
 +  * Fix typo in apt-cache.8.xml: nessasarily
 +  * Fix "with with" in apt-get.8.xml
 +  * Fix some of the typos mentioned by the german team
 +    Closes: #479997
 +  * Polish translation update by Wiktor Wandachowicz
 +    Closes: #548571
 +  * German translation update by Holger Wansing
 +    Closes: #551534
 +  * German translation of manpages by Chris Leick
 +    Closes: #552606
 +  * Italian translation update by Milo Casagrande
 +    Closes: #555797
 +  * Simplified Chinese translation update by Aron Xu 
 +    Closes: #558737
 +  
    [ Michael Vogt ]
 -  * apt-pkg/deb/dpkgpm.cc:
 -    - when tcgetattr() returns non-zero skip all pty magic 
 -      (thanks to Simon Richter, closes: #509866)
 -  * apt-inst/contrib/arfile.cc:
 -    - show propper error message for Invalid archive members
 +  * apt-pkg/packagemanager.cc:
 +    - fix overly aggressive immediate config propergation
 +      (thanks to David Kalnischkies)
+   * apt-pkg/packagemanager.cc:
+     - add output about pre-depends configuring when debug::pkgPackageManager
+       is used
+   * methods/https.cc:
+     - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972
+       thanks to Brian Thomason for the patch
+   [ Brian Murray ]
+   * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc:
+     - typo fix (LP: #462328)
+   
+   [ Loïc Minier ]
+   * cmdline/apt-key:
+     - Emit a warning if removed keys keyring is missing and skip associated
+       checks (LP: #218971)
  
 - -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 31 Aug 2009 11:08:03 +0200
 +  [ Julian Andres Klode ]
 +  * doc/apt.conf.5.xml:
 +    - Deprecate unquoted values, string concatenation and explain what should
 +      not be written inside a value (quotes,backslash).
 +    - Restrict option names to alphanumerical characters and "/-:._+".
 +    - Deprecate #include, we have apt.conf.d nowadays which should be
 +      sufficient.
 +  * methods/https.cc:
 +    - Add support for authentication using netrc (Closes: #518473), patch
 +      by Jussi Hakala <jussi.hakala@hut.fi>.
 +  * ftparchive/apt-ftparchive.cc:
 +    - Call setlocale() so translations are actually used.
 +  * debian/apt.conf.autoremove:
 +    - Add kfreebsd-image-* to the list (Closes: #558803)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 29 Sep 2009 15:51:34 +0200
 +
 +apt (0.7.24) unstable; urgency=low
  
 -apt (0.7.22.3) UNRELEASED; urgency=low
 +  [ Nicolas François ]
 +  * Cleaned up the first patch draft from KURASAWA Nozomu to finally
 +    get po4a support for translating the man pages.
 +    Many thanks to both for this excellent work! (Closes: #441608)
 +  * doc/ja/*, doc/po/ja.po:
 +    - remove the old ja man page translation and replace it with
 +      the new po4a-powered translation by KURASAWA Nozomu.
 +  * doc/*.?.xml (manpages):
 +    - add contrib to author tags and also add refmiscinfo to fix warnings
 +  * doc/style.txt, buildlib/defaults.mak, buildlib/manpage.mak:
 +    - fix a few typos in the comments of this files
 +
 +  [ Michael Vogt ]
 +  * apt-pkg/deb/dpkgpm.cc:
 +    - when tcgetattr() returns non-zero skip all pty magic 
 +      (thanks to Simon Richter, closes: #509866)
 +  * apt-inst/contrib/arfile.cc:
 +    - show propper error message for Invalid archive members
 +
 +  [ David Kalnischkies ]
 +  * doc/Doxyfile.in:
 +    - update file with doxygen 1.6.1 (current unstable)
 +    - activate DOT_MULTI_TARGETS, it is default on since doxygen 1.5.9
 +  * buildlib/po4a_manpage.mak, doc/makefile, configure:
 +    - simplify the makefiles needed for po4a manpages
 +  * apt-pkg/contrib/configuration.cc:
 +    - add a helper to easily get a vector of strings from the config
 +  * apt-pkg/contrib/strutl.cc:
 +    - replace unknown multibytes with ? in UTF8ToCharset (Closes: #545208)
 +  * doc/apt-get.8.xml:
 +    - fix two little typos in the --simulate description. (Closes: #545059)
 +  * apt-pkg/aptconfiguration.cc, doc/apt.conf.5.xml:
 +    - add an order subgroup to the compression types to simplify reordering
 +      a bit and improve the documentation for this option group.
 +  * doc/apt.conf.5.xml:
 +    - document the Acquire::http::Dl-Limit option
 +    - try to be crystal clear about the usage of :: and {} (Closes: #503481)
 +  * doc/apt-cache.8.xml:
 +    - clarify the note for the pkgnames command (Closes: #547599)
 +  * doc/apt.ent, all man pages:
 +    - move the description of files to globally usable entities
 +  * doc/apt_preferences.5.xml:
 +    - document the new preferences.d folder (Closes: #544017)
 +  * methods/rred.cc:
 +    - add at the top without failing (by Bernhard R. Link, Closes: #545694)
 +  * buildlib/sizetable:
 +    - add amd64 for cross building (by Mikhail Gusarov, Closes: #513058)
 +  * debian/prerm:
 +    - remove file as nobody will upgrade from 0.4.10 anymore
 +  * debian/control:
 +    - remove gnome-apt suggestion as it was removed from debian
 +  * apt-pkg/deb/dpkgpm.cc, apt-pkg/packagemanager.cc, apt-pkg/orderlist.cc:
 +    - add and document _experimental_ options to make (aggressive)
 +      use of dpkg's trigger and configuration handling (Closes: #473461)
 +  * cmdline/apt-get.cc:
 +    - ignore versions that are not candidates when selecting a package
 +      instead of a virtual one (by Marius Vollmer, Closes: #547788)
 +
 +  [ Christian Perrier ]
 +  * doc/fr/*, doc/po/fr.po:
 +    - remove the old fr man page translation and replace it with
 +      the new po4a-powered translation
 +  * doc/de: dropped (translation is too incomplete to be useful in
 +      the transition to the po4a-powered translations)
 +
 + -- Michael Vogt <mvo@debian.org>  Fri, 25 Sep 2009 19:57:25 +0200
 +
 +apt (0.7.23.1) unstable; urgency=low
 +
 +  [ Michael Vogt ]
 +  * apt-pkg/pkgcache.cc:
 +    - do not set internel "needs-configure" state for packages in 
 +      triggers-pending state. dpkg will deal with the trigger and
 +      it if does it before we trigger it, dpkg will error out
 +      (LP: #414631)
 +  * apt-pkg/acquire-item.cc:
 +    - do not segfault on invalid items (closes: #544080)
 +
 + -- Michael Vogt <mvo@debian.org>  Fri, 28 Aug 2009 21:53:20 +0200
 +
 +apt (0.7.23) unstable; urgency=low
  
    [ Eugene V. Lyubimkin ]
    * methods/{http,https,ftp}, doc/apt.conf.5.xml:
        mentioned above are not specified.
        (Closes: #445985, #157759, #320184, #365880, #479617)
    
 -  [ Michael Vogt ]
 -  * apt-pkg/pkgcache.cc:
 -    - do not set internel "needs-configure" state for packages in 
 -      triggers-pending state. dpkg will deal with the trigger and
 -      it if does it before we trigger it, dpkg will error out
 -      (LP: #414631)
 +  [ David Kalnischkies ]
 +  * cmdline/apt-get.cc:
 +    - add APT::Get::HideAutoRemove=small to display only a short line
 +      instead of the full package list. (Closes: #537450)
 +    - ShowBroken() in build-dep (by Mike O'Connor, Closes: #145916)
 +    - check for statfs.f_type (by Robert Millan, Closes: #509313)
 +    - correct the order of picked package binary vs source in source
 +    - use SourceVersion instead of the BinaryVersion to get the source
 +      Patch by Matt Kraai, thanks! (Closes: #382826)
 +    - add pkg/archive and codename in source (Closes: #414105, #441178)
 +  * apt-pkg/contrib/strutl.cc:
 +    - enable thousand separator according to the current locale
 +      (by Luca Bruno, Closes: #223712)
 +  * doc/apt.conf.5.xml:
 +    - mention the apt.conf.d dir (by Vincent McIntyre, Closes: #520831)
 +  * apt-inst/contrib/arfile.cc:
 +    - use sizeof instead strlen (by Marius Vollmer, Closes: #504325)
 +  * doc/apt-mark.8.xml:
 +    - improve manpage based on patch by Carl Chenet (Closes: #510286)
 +  * apt-pkg/acquire-item.cc:
 +    - use configsettings for dynamic compression type use and order.
 +      Based on a patch by Jyrki Muukkonen, thanks! (LP: #71746)
 +  * apt-pkg/aptconfiguration.cc:
 +    - add default configuration for compression types and add lzma
 +      support. Order is now bzip2, lzma, gzip, none (Closes: #510526)
 +  * ftparchive/writer.cc:
 +    - add lzma support also here, patch for this (and inspiration for
 +      the one above) by Robert Millan, thanks!
 +  * apt-pkg/depcache.cc:
 +    - restore the --ignore-hold effect in the Is{Delete,Install}Ok hooks
 +  * doc/apt-get.8.xml:
 +    - update the source description to reflect what it actually does
 +      and how it can be used. (Closes: #413021)
 +  * methods/http.cc:
 +    - allow empty Reason-Phase in Status-Line to please squid,
 +      thanks Modestas Vainius for noticing! (Closes: #531157, LP: #411435)
 +
 +  [ George Danchev ]
 +  * cmdline/apt-cache.cc:
 +    - fix a memory leak in the xvcg method (Closes: #511557)
 +  * apt-pkg/indexcopy.cc:
 +    - fix a memory leak then the Release file not exists (Closes: #511556)
  
 - -- Michael Vogt <mvo@debian.org>  Wed, 19 Aug 2009 11:14:15 +0200
 + -- Michael Vogt <mvo@debian.org>  Thu, 27 Aug 2009 14:44:39 +0200
  
  apt (0.7.22.2) unstable; urgency=low
  
@@@ -265,7 -129,7 +280,7 @@@ apt (0.7.22) unstable; urgency=lo
        (off by default)
      - send "dpkg-exec" message on the status fd when dpkg is run
      - provide DPkg::Chroot-Directory config option (useful for testing)
 -    - fix potential hang when in a backgroud process group
 +    - fix potential hang when in a background process group
    * apt-pkg/algorithms.cc:
      - consider recommends when making the scores for the problem 
        resolver
    * apt-pkg/deb/debsystem.cc:
      - make strings i18n able 
    * fix problematic use of tolower() when calculating the version 
 -    hash by using locale independant tolower_ascii() function. 
 +    hash by using locale independent tolower_ascii() function. 
      Thanks to M. Vefa Bicakci (LP: #80248)
    * build fixes for g++-4.4
    * cmdline/apt-mark:
diff --combined methods/https.cc
index 79e6fea3f42d6c1b173993a6092ba5d1a71329da,dbc1cf52cde1643c59d93c310b9db168b6860f93..47988970b5c93c8b89733383a985efe0c0c439d9
@@@ -135,7 -135,6 +135,7 @@@ bool HttpsMethod::Fetch(FetchItem *Itm
     curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false);
     curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
     curl_easy_setopt(curl, CURLOPT_FILETIME, true);
 +   curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
  
     // SSL parameters are set by default to the common (non mirror-specific) value
     // if available (or a default one) and gets overload by mirror-specific ones.
  
     // set timeout
     int timeout = _config->FindI("Acquire::http::Timeout",120);
-    curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
     curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout);
+    //set really low lowspeed timeout (see #497983)
+    curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, DL_MIN_SPEED);
+    curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout);
  
     // set redirect options and default to 10 redirects
     bool AllowRedirect = _config->FindI("Acquire::https::AllowRedirect", true);