##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#include <config.h>
+
#include <apt-pkg/acquire-method.h>
#include <apt-pkg/cdrom.h>
#include <apt-pkg/cdromutl.h>
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
#include <apt-pkg/hashes.h>
+#include <string>
+#include <vector>
#include <sys/stat.h>
-#include <unistd.h>
-#include <dlfcn.h>
#include <iostream>
#include <apti18n.h>
CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly |
SendConfig | NeedsCleanup |
Removable),
- DatabaseLoaded(false),
+ DatabaseLoaded(false),
+ Debug(false),
MountedByApt(false)
{
UdevCdroms.Dlopen();
-};
+}
/*}}}*/
// CDROMMethod::Exit - Unmount the disc if necessary /*{{{*/
// ---------------------------------------------------------------------
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;
Hashes Hash;
FileFd Fd(Res.Filename, FileFd::ReadOnly);
- Hash.AddFD(Fd.Fd(), Fd.Size());
+ Hash.AddFD(Fd);
Res.TakeHashes(Hash);
URIDone(Res);