]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/update.cc
Turn tolower_ascii() and isspace_ascii() into inline functions
[apt.git] / apt-pkg / update.cc
index 97be5490ba5c95e4629084e7c086d70b437019c5..369e8512272647bd386a14d9672584df403c7de1 100644 (file)
@@ -1,24 +1,16 @@
-
 // Include Files                                                       /*{{{*/
 #include <config.h>
 
 // Include Files                                                       /*{{{*/
 #include <config.h>
 
-#include <apt-pkg/algorithms.h>
-#include <apt-pkg/update.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/version.h>
-#include <apt-pkg/sptr.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-item.h>
-#include <apt-pkg/edsp.h>
-#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
-#include <apt-pkg/progress.h>
+#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/update.h>
 
 
-#include <sys/types.h>
-#include <cstdlib>
-#include <algorithm>
-#include <iostream>
-#include <stdio.h>
+#include <string>
 
 #include <apti18n.h>
                                                                        /*}}}*/
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -34,8 +26,8 @@ bool ListUpdate(pkgAcquireStatus &Stat,
                pkgSourceList &List, 
                int PulseInterval)
 {
                pkgSourceList &List, 
                int PulseInterval)
 {
-   pkgAcquire Fetcher;
-   if (Fetcher.Setup(&Stat, _config->FindDir("Dir::State::Lists")) == false)
+   pkgAcquire Fetcher(&Stat);
+   if (Fetcher.GetLock(_config->FindDir("Dir::State::Lists")) == false)
       return false;
 
    // Populate it with the source selection
       return false;
 
    // Populate it with the source selection
@@ -81,7 +73,7 @@ bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval,
       uri.User.clear();
       uri.Password.clear();
       string descUri = string(uri);
       uri.User.clear();
       uri.Password.clear();
       string descUri = string(uri);
-      _error->Warning(_("Failed to fetch %s  %s\n"), descUri.c_str(),
+      _error->Warning(_("Failed to fetch %s  %s"), descUri.c_str(),
              (*I)->ErrorText.c_str());
 
       if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError) 
              (*I)->ErrorText.c_str());
 
       if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError)