]> git.saurik.com Git - apt.git/commitdiff
do not show IP in output of testcases
authorDavid Kalnischkies <david@kalnischkies.de>
Tue, 7 Oct 2014 21:52:12 +0000 (23:52 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Tue, 7 Oct 2014 21:52:12 +0000 (23:52 +0200)
On travis-ci connect.cc detects a rotation, triggering it store the IP
which is later appended to the error message, which is all nice and
great if we deal with a real server, but in the testcases it just
triggers failures as strings do not match.

Git-Dch: Ignore

apt-pkg/acquire-method.cc
test/integration/framework

index 82f2fb3ce091e51c9e11afe88f21bedc60bef096..cbcbea247f38f5e1e4a4a8b5c309e7c0bf367956 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"
    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
       Dequeue();
    }
    else
index ad3c33c28b9d8bbd44ee4b592e2669ceb4d0b4df..75cec204cc25cecaa3988d8f836a9d3a38c24b4f 100644 (file)
@@ -235,6 +235,9 @@ setupenvironment() {
        echo 'quiet::NoStatistic "true";' >> aptconfig.conf
        # too distracting for users, but helpful to detect changes
        echo 'Acquire::Progress::Ignore::ShowErrorText "true";' >> aptconfig.conf
        echo 'quiet::NoStatistic "true";' >> aptconfig.conf
        # too distracting for users, but helpful to detect changes
        echo 'Acquire::Progress::Ignore::ShowErrorText "true";' >> aptconfig.conf
+       # in testcases, it can appear as if localhost has a rotation setup,
+       # hide this as we can't really deal with it properly
+       echo 'Acquire::Failure::ShowIP "false";' >> aptconfig.conf
 
        echo "Acquire::https::CaInfo \"${TESTDIR}/apt.pem\";" > rootdir/etc/apt/apt.conf.d/99https
        echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary
 
        echo "Acquire::https::CaInfo \"${TESTDIR}/apt.pem\";" > rootdir/etc/apt/apt.conf.d/99https
        echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary