Просмотр исходного кода

don't show ErrorText for Ign by default

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
David Kalnischkies лет назад: 11
Родитель
Сommit
d6cf2345a3
2 измененных файлов с 7 добавлено и 2 удалено
  1. 2 1
      apt-private/acqprogress.cc
  2. 5 1
      test/integration/framework

+ 2 - 1
apt-private/acqprogress.cc

@@ -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->ErrorText.empty() == false)
+      if (Itm.Owner->ErrorText.empty() == false &&
+	    _config->FindB("Acquire::Progress::Ignore::ShowErrorText", false) == true)
 	 cout << "  " << Itm.Owner->ErrorText << endl;
    }
    else

+ 5 - 1
test/integration/framework

@@ -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
+
 	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
+	# 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 "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