X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/db0db9feabf17156f1f4e10d0131d18dfb593b4e..e1dbde8dd006ca0ed6b7a6c383af7bbc60014912:/cmdline/acqprogress.cc diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc index 8b30b324b..32e8243bf 100644 --- a/cmdline/acqprogress.cc +++ b/cmdline/acqprogress.cc @@ -145,12 +145,12 @@ void AcqTextStatus::Stop() bandwidth and ETA indicator. */ bool AcqTextStatus::Pulse(pkgAcquire *Owner) { + pkgAcquireStatus::Pulse(Owner); + if (Quiet > 0) return true; - pkgAcquireStatus::Pulse(Owner); - - enum {Long = 0,Medium,Short} Mode = Long; + enum {Long = 0,Medium,Short} Mode = Medium; char Buffer[sizeof(BlankLine)]; char *End = Buffer + sizeof(Buffer); @@ -274,10 +274,16 @@ bool AcqTextStatus::MediaChange(string Media,string Drive) Media.c_str(),Drive.c_str()); char C = 0; + bool bStatus = true; while (C != '\n' && C != '\r') - read(STDIN_FILENO,&C,1); - - Update = true; - return true; + { + int len = read(STDIN_FILENO,&C,1); + if(C == 'c' || len <= 0) + bStatus = false; + } + + if(bStatus) + Update = true; + return bStatus; } /*}}}*/