From: Michael Vogt Date: Tue, 26 Jan 2010 10:49:29 +0000 (+0100) Subject: add new "Acquire::cdrom::AutoDetect" config that enables/disables X-Git-Tag: 0.7.25.3~9 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/bca4c203ac8664f7cdbffd4ce8474b358f708658?ds=sidebyside add new "Acquire::cdrom::AutoDetect" config that enables/disables the dlopen of libudev for automatic cdrom detection. Off by default currently, feedback/testing welcome --- diff --git a/debian/changelog b/debian/changelog index 39798f635..388078f2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ apt (0.7.25.2) UNRELEASED; urgency=low the umount again * methods/cdrom.cc: - fixes in multi cdrom setup code + - add new "Acquire::cdrom::AutoDetect" config that enables/disables + the dlopen of libudev for automatic cdrom detection. Off by default + currently, feedback/testing welcome * cmdline/apt-mark: - merge fix from Gene Cash that supports markauto for packages that are not in the extended_states file yet diff --git a/methods/cdrom.cc b/methods/cdrom.cc index b0f1a1551..b3f461816 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -218,6 +218,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) return true; } + bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect", false); CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); if (Debug) clog << "Looking for CDROM at " << CDROM << endl; @@ -228,7 +229,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) string NewID; while (CurrentID.empty() == true) { - if (CDROM == "apt-udev-auto/") + if (AutoDetect) AutoDetectAndMount(Get, NewID); if(!IsMounted(CDROM))