]> git.saurik.com Git - apt.git/commitdiff
don't show ErrorText for Ign by default
authorDavid Kalnischkies <david@kalnischkies.de>
Tue, 7 Oct 2014 18:51:07 +0000 (20:51 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Tue, 7 Oct 2014 19:08:37 +0000 (21:08 +0200)
Some distributions (or repositories) do not have as much
"Ign-discipline" as I would like to, so that could be pretty distracting
for our users if enabled by default. It is handy for testcases though.

Git-Dch: Ignore

apt-private/acqprogress.cc
test/integration/framework

index aa88d53344fbbb66695084e48fafd02d4605a828..14a53eacb495e61078baf2d36a542e4bbb0184a2 100644 (file)
@@ -117,7 +117,8 @@ void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm)
    if (Itm.Owner->Status == pkgAcquire::Item::StatDone)
    {
       cout << _("Ign ") << Itm.Description << endl;
    if (Itm.Owner->Status == pkgAcquire::Item::StatDone)
    {
       cout << _("Ign ") << Itm.Description << endl;
-      if (Itm.Owner->ErrorText.empty() == false)
+      if (Itm.Owner->ErrorText.empty() == false &&
+           _config->FindB("Acquire::Progress::Ignore::ShowErrorText", false) == true)
         cout << "  " << Itm.Owner->ErrorText << endl;
    }
    else
         cout << "  " << Itm.Owner->ErrorText << endl;
    }
    else
index 0aa648fb657c734d213b76b9c7cdebdb63a92ced..ad3c33c28b9d8bbd44ee4b592e2669ceb4d0b4df 100644 (file)
@@ -215,6 +215,7 @@ setupenvironment() {
        cp $(find $TESTDIRECTORY -name '*.pub' -o -name '*.sec') keys/
        chmod 644 $(find keys -name '*.pub' -o -name '*.sec')
        ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
        cp $(find $TESTDIRECTORY -name '*.pub' -o -name '*.sec') keys/
        chmod 644 $(find keys -name '*.pub' -o -name '*.sec')
        ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
+
        echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf
        echo "Dir::state::status \"${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status\";" >> aptconfig.conf
        echo "Debug::NoLocking \"true\";" >> aptconfig.conf
        echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf
        echo "Dir::state::status \"${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status\";" >> aptconfig.conf
        echo "Debug::NoLocking \"true\";" >> aptconfig.conf
@@ -232,8 +233,11 @@ setupenvironment() {
        echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
        echo 'quiet::NoUpdate "true";' >> aptconfig.conf
        echo 'quiet::NoStatistic "true";' >> aptconfig.conf
        echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
        echo 'quiet::NoUpdate "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
+
        echo "Acquire::https::CaInfo \"${TESTDIR}/apt.pem\";" > rootdir/etc/apt/apt.conf.d/99https
        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 "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary
        configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
 
        # cleanup the environment a bit
        configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
 
        # cleanup the environment a bit