summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-02-14 18:35:35 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-02-14 19:14:45 +0100
commit5543218acdbbeef1d9f6d118e0b86a765c341430 (patch)
tree71114ef8efb0736bab4129f1f796ade8f98869ef /apt-private
parent8190b07a4b338e005fa30d769cb34f1fd29eaa45 (diff)
honor option to disable pulses for the testcases
Git-Dch: Ignore
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/acqprogress.cc7
-rw-r--r--apt-private/acqprogress.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc
index af2d0f461..3aafea4f2 100644
--- a/apt-private/acqprogress.cc
+++ b/apt-private/acqprogress.cc
@@ -30,10 +30,13 @@ using namespace std;
// AcqTextStatus::AcqTextStatus - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-AcqTextStatus::AcqTextStatus(unsigned int &ScreenWidth,unsigned int Quiet) :
- ScreenWidth(ScreenWidth), ID(0), Quiet(Quiet)
+AcqTextStatus::AcqTextStatus(unsigned int &ScreenWidth,unsigned int const Quiet) :
+ pkgAcquireStatus(), ScreenWidth(ScreenWidth), ID(0), Quiet(Quiet)
{
BlankLine[0] = 0;
+ // testcases use it to disable pulses without disabling other user messages
+ if (_config->FindB("quiet::NoUpdate", false) == true)
+ this->Quiet = 1;
}
/*}}}*/
// AcqTextStatus::Start - Downloading has started /*{{{*/
diff --git a/apt-private/acqprogress.h b/apt-private/acqprogress.h
index e47bfb72d..e12dafe50 100644
--- a/apt-private/acqprogress.h
+++ b/apt-private/acqprogress.h
@@ -32,7 +32,7 @@ class AcqTextStatus : public pkgAcquireStatus
bool Pulse(pkgAcquire *Owner);
- AcqTextStatus(unsigned int &ScreenWidth,unsigned int Quiet);
+ AcqTextStatus(unsigned int &ScreenWidth,unsigned int const Quiet);
};
#endif