]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/update.cc
FileFdPrivate: Add getter and setter for fields
[apt.git] / apt-pkg / update.cc
index 5d5b1962670383f248447b55e53f3c229f832d8d..369e8512272647bd386a14d9672584df403c7de1 100644 (file)
@@ -11,7 +11,6 @@
 #include <apt-pkg/update.h>
 
 #include <string>
-#include <vector>
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -27,8 +26,8 @@ bool ListUpdate(pkgAcquireStatus &Stat,
                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
@@ -74,7 +73,7 @@ bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval,
       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)