]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cdrom.cc
merge with my debian-sid branch
[apt.git] / apt-pkg / cdrom.cc
index b8acf0cbefc99c971d84def9527d1cb805d0f9fd..a9c63fd214386624dfcd75f3b3caa8808f104658 100644 (file)
@@ -1,5 +1,6 @@
 /*
  */
+#include<config.h>
 
 #include<apt-pkg/init.h>
 #include<apt-pkg/error.h>
@@ -7,11 +8,11 @@
 #include<apt-pkg/strutl.h>
 #include<apt-pkg/cdrom.h>
 #include<apt-pkg/aptconfiguration.h>
+#include<apt-pkg/configuration.h>
+#include<apt-pkg/fileutl.h>
 
 #include<sstream>
 #include<fstream>
-#include<config.h>
-#include<apti18n.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <dirent.h>
@@ -22,6 +23,8 @@
 
 #include "indexcopy.h"
 
+#include<apti18n.h>
+
 using namespace std;
 
 // FindPackages - Find the package files on the CDROM                  /*{{{*/
@@ -874,9 +877,7 @@ pkgUdevCdromDevices::Dlopen()                                       /*{{{*/
    libudev_handle = h;
    udev_new = (udev* (*)(void)) dlsym(h, "udev_new");
    udev_enumerate_add_match_property = (int (*)(udev_enumerate*, const char*, const char*))dlsym(h, "udev_enumerate_add_match_property");
-#if 0 // FIXME: uncomment on next ABI break
    udev_enumerate_add_match_sysattr = (int (*)(udev_enumerate*, const char*, const char*))dlsym(h, "udev_enumerate_add_match_sysattr");
-#endif
    udev_enumerate_scan_devices = (int (*)(udev_enumerate*))dlsym(h, "udev_enumerate_scan_devices");
    udev_enumerate_get_list_entry = (udev_list_entry* (*)(udev_enumerate*))dlsym(h, "udev_enumerate_get_list_entry");
    udev_device_new_from_syspath = (udev_device* (*)(udev*, const char*))dlsym(h, "udev_device_new_from_syspath");
@@ -890,10 +891,8 @@ pkgUdevCdromDevices::Dlopen()                                      /*{{{*/
    return true;
 }
                                                                        /*}}}*/
-
                                                                         /*{{{*/
-// compatiblity only with the old API/ABI, can be removed on the next
-// ABI break
+// convenience interface, this will just call ScanForRemovable
 vector<CdromDevice>
 pkgUdevCdromDevices::Scan()
 { 
@@ -918,10 +917,6 @@ pkgUdevCdromDevices::ScanForRemovable(bool CdromOnly)
    if (CdromOnly)
       udev_enumerate_add_match_property(enumerate, "ID_CDROM", "1");
    else {
-#if 1 // FIXME: remove the next two lines on the next ABI break
-      int (*udev_enumerate_add_match_sysattr)(struct udev_enumerate *udev_enumerate, const char *property, const char *value);
-      udev_enumerate_add_match_sysattr = (int (*)(udev_enumerate*, const char*, const char*))dlsym(libudev_handle, "udev_enumerate_add_match_sysattr");
-#endif
       udev_enumerate_add_match_sysattr(enumerate, "removable", "1");
    }