summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:51 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:51 +0000
commit76d97c26ae8ca9d55c1e44a13eb0a013f0adc592 (patch)
tree41d3ed4a977e9126f6d7fd791729b85124fb9988 /methods
parent143e0a1f9a3f1be0ea59637492a0b2cf9d7fa4db (diff)
Fixed cdrom method problems
Author: jgg Date: 1998-12-05 01:45:19 GMT Fixed cdrom method problems
Diffstat (limited to 'methods')
-rw-r--r--methods/cdrom.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/methods/cdrom.cc b/methods/cdrom.cc
index 933d88fc4..de5f8147c 100644
--- a/methods/cdrom.cc
+++ b/methods/cdrom.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cdrom.cc,v 1.2 1998/12/04 22:56:55 jgg Exp $
+// $Id: cdrom.cc,v 1.3 1998/12/05 01:45:21 jgg Exp $
/* ######################################################################
CDROM URI method for APT
@@ -34,7 +34,8 @@ class CDROMMethod : public pkgAcqMethod
// CDROMMethod::CDROMethod - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly)
+CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly |
+ SendConfig)
{
// Read the database
string DFile = _config->FindFile("Dir::State::cdroms");
@@ -104,6 +105,8 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
}
string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
+ if (CDROM[0] == '.')
+ CDROM= SafeGetCWD() + '/' + CDROM;
string NewID;
while (1)
{
@@ -117,8 +120,9 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
UnmountCdrom(CDROM);
if (MediaFail(Get.Host,CDROM) == false)
{
- ID = "FAIL";
- break;
+ CurrentID = "FAIL";
+ Fail("Wrong CD",true);
+ return true;
}
MountCdrom(CDROM);