diff options
-rw-r--r-- | apt-pkg/acquire-method.cc | 2 | ||||
-rw-r--r-- | cmdline/acqprogress.cc | 14 | ||||
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | methods/cdrom.cc | 3 |
4 files changed, 20 insertions, 7 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index 04c62eaaa..41b832f3b 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -277,7 +277,7 @@ bool pkgAcqMethod::MediaFail(string Required,string Drive) MyMessages.erase(MyMessages.begin()); } - return !StringToBool(LookupTag(Message,"Fail"),false); + return !StringToBool(LookupTag(Message,"Failed"),false); } Messages.push_back(Message); 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; } /*}}}*/ diff --git a/debian/changelog b/debian/changelog index 25b9005ec..f9e9c22ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.6.40.1ubuntu6) breezy; urgency=low + + * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-56: + - make it possible for apt to handle a failed MediaChange event and + fall back to other sources (ubuntu #13713) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 13 Sep 2005 22:09:50 +0200 + apt (0.6.40.1ubuntu5) breezy; urgency=low * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-{50,51}. diff --git a/methods/cdrom.cc b/methods/cdrom.cc index 41eb8a0ee..d6b8eae75 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -166,8 +166,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) if (MediaFail(Get.Host,CDROM) == false) { CurrentID = "FAIL"; - Fail(_("Wrong CD-ROM"),true); - return true; + return _error->Error(_("Disk not found.")); } } |