Просмотр исходного кода

add new "Acquire::cdrom::AutoDetect" config that enables/disables
the dlopen of libudev for automatic cdrom detection. Off by default
currently, feedback/testing welcome

Michael Vogt лет назад: 16
Родитель
Сommit
bca4c203ac
2 измененных файлов с 5 добавлено и 1 удалено
  1. 3 0
      debian/changelog
  2. 2 1
      methods/cdrom.cc

+ 3 - 0
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

+ 2 - 1
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))