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

add new "Acquire::cdrom::AutoDetect" variable that enables/disables
the dlopen of libudev for automatic cdrom detection

Michael Vogt лет назад: 16
Родитель
Сommit
ff1e4b0626
3 измененных файлов с 8 добавлено и 1 удалено
  1. 2 0
      debian/changelog
  2. 4 0
      doc/examples/configure-index
  3. 2 1
      methods/cdrom.cc

+ 2 - 0
debian/changelog

@@ -10,6 +10,8 @@ apt (0.7.25.1) UNRELEASED; urgency=low
       the umount again
   * methods/cdrom.cc:
     - fixes in multi cdrom setup code
+    - add new "Acquire::cdrom::AutoDetect" variable that enables/disables
+      the dlopen of libudev for automatic cdrom detection
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 18 Dec 2009 16:54:18 +0100
 

+ 4 - 0
doc/examples/configure-index

@@ -250,6 +250,10 @@ Acquire
   
   cdrom
   {
+    // do auto detection of the cdrom mountpoint
+    AutoDetect "true";
+    
+    // cdrom mountpoint (needs to be defined in fstab if AutoDetect is not used)
     mount "/cdrom";
 
     // You need the trailing slash!

+ 2 - 1
methods/cdrom.cc

@@ -218,6 +218,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
       return true;
    }
 
+   bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect", true);
    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))