summaryrefslogtreecommitdiff
path: root/cmdline/acqprogress.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-09-13 20:11:06 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-09-13 20:11:06 +0000
commitdb9df293ef7483f275e8aae2200767c8c6fdf9df (patch)
treea14d137b6d186d585ecb12805c547c149b131563 /cmdline/acqprogress.cc
parent1e9331420fe8b6bed8aa88fb918f054eab7d2d3f (diff)
parent2a7497704e9dee1f1d987e7a2cd59e939d991909 (diff)
* make it possible to fall back to other sources on fail in MediaChange events
Patches applied: * michael.vogt@ubuntu.com--2005/apt--cdrom-fallback--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-110 * michael.vogt@ubuntu.com--2005/apt--cdrom-fallback--0--patch-1 * initial patch to make falling back from cdrom possible * michael.vogt@ubuntu.com--2005/apt--cdrom-fallback--0--patch-2 * fix in methods/cdrom.cc: don't call Fail() but return false so that apt can fallback to a differencent source * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-56 * merged from apt--cdrom-fallback--0
Diffstat (limited to 'cmdline/acqprogress.cc')
-rw-r--r--cmdline/acqprogress.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc
index 8b30b324b..a5fee1db5 100644
--- a/cmdline/acqprogress.cc
+++ b/cmdline/acqprogress.cc
@@ -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;
}
/*}}}*/