]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-method.cc
Merge branch 'debian/jessie' into debian/experimental
[apt.git] / apt-pkg / acquire-method.cc
index 82f2fb3ce091e51c9e11afe88f21bedc60bef096..c29ef469e18eb16d9e7d1c68187918819acaf6b2 100644 (file)
@@ -102,7 +102,10 @@ void pkgAcqMethod::Fail(string Err,bool Transient)
    if (Queue != 0)
    {
       std::cout << "400 URI Failure\nURI: " << Queue->Uri << "\n"
-               << "Message: " << Err << " " << IP << "\n";
+               << "Message: " << Err;
+      if (IP.empty() == false && _config->FindB("Acquire::Failure::ShowIP", true) == true)
+        std::cout << " " << IP;
+      std::cout << "\n";
       Dequeue();
    }
    else
@@ -124,7 +127,7 @@ void pkgAcqMethod::Fail(string Err,bool Transient)
 /* */
 void pkgAcqMethod::DropPrivsOrDie()
 {
-   if (!DropPrivs()) {
+   if (!DropPrivileges()) {
       Fail(false);
       exit(112);       /* call the european emergency number */
    }
@@ -372,6 +375,8 @@ int pkgAcqMethod::Run(bool Single)
               if (hash.empty() == false)
                  Tmp->ExpectedHashes.push_back(HashString(*t, hash));
            }
+            char *End;
+            Tmp->MaximumSize = strtoll(LookupTag(Message, "Maximum-Size", "0").c_str(), &End, 10);
            Tmp->Next = 0;
            
            // Append it to the list
@@ -472,3 +477,5 @@ void pkgAcqMethod::Dequeue() {                                              /*{{{*/
    delete Tmp;
 }
                                                                        /*}}}*/
+
+pkgAcqMethod::~pkgAcqMethod() {}