X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d328fd1a20543192a7ea3eac124f10a5793743e9..443f5e8a3205162ec6933529c5ca0c95ad3f6941:/methods/cdrom.cc diff --git a/methods/cdrom.cc b/methods/cdrom.cc index 6d694e7c9..22d4b9164 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -8,12 +8,15 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include #include #include #include +#include #include #include @@ -54,7 +57,8 @@ class CDROMMethod : public pkgAcqMethod CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly | SendConfig | NeedsCleanup | Removable), - DatabaseLoaded(false), + DatabaseLoaded(false), + Debug(false), MountedByApt(false) { UdevCdroms.Dlopen(); @@ -219,8 +223,8 @@ bool CDROMMethod::Fetch(FetchItem *Itm) return true; } - bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect", false); - CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); + bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect", true); + CDROM = _config->FindDir("Acquire::cdrom::mount"); if (Debug) clog << "Looking for CDROM at " << CDROM << endl; @@ -264,7 +268,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) Hashes Hash; FileFd Fd(Res.Filename, FileFd::ReadOnly); - Hash.AddFD(Fd.Fd(), Fd.Size()); + Hash.AddFD(Fd); Res.TakeHashes(Hash); URIDone(Res);