summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:52:19 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:52:19 +0000
commit9e0349cc4674d0f90434e415e157a21f1ff9589b (patch)
treec8c11898741f6820dcbe354f68edd5a76b8cd5c2 /methods
parent33abc0e5956f24613e4851e024f33c78426eaba0 (diff)
Fixes
Author: jgg Date: 1998-12-22 07:52:05 GMT Fixes
Diffstat (limited to 'methods')
-rw-r--r--methods/cdrom.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/methods/cdrom.cc b/methods/cdrom.cc
index 0187283c1..35a9b044d 100644
--- a/methods/cdrom.cc
+++ b/methods/cdrom.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cdrom.cc,v 1.5 1998/12/22 07:41:25 jgg Exp $
+// $Id: cdrom.cc,v 1.6 1998/12/22 07:52:05 jgg Exp $
/* ######################################################################
CDROM URI method for APT
@@ -56,7 +56,6 @@ string CDROMMethod::GetID(string Name)
{
_error->Error("Unable to read the cdrom database %s",
DFile.c_str());
- Fail();
return string();
}
}
@@ -95,20 +94,22 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
}
string ID = GetID(Get.Host);
+ if (_error->PendingError() == true)
+ return false;
// All non IMS queries for package files fail.
if (Itm->IndexFile == true || ID.empty() == true)
{
Fail("Please use apt-cdrom to make this CD recognized by APT."
" apt-get update cannot be used to add new CDs");
- return false;
+ return true;
}
// We already have a CD inserted, but it is the wrong one
if (CurrentID.empty() == false && ID != CurrentID)
{
Fail("Wrong CD",true);
- return false;
+ return true;
}
string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
@@ -129,7 +130,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
{
CurrentID = "FAIL";
Fail("Wrong CD",true);
- return false;
+ return true;
}
MountCdrom(CDROM);