]> git.saurik.com Git - apt.git/blobdiff - methods/cdrom.cc
do not request files if we expect an IMS hit
[apt.git] / methods / cdrom.cc
index 22d4b9164225e6575363d359be8fb006b1c0e7e5..10cb29f662be05318858e671a382792d283d87bd 100644 (file)
@@ -19,9 +19,9 @@
 #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>
@@ -62,7 +62,7 @@ CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly |
                                           MountedByApt(false)
 {
    UdevCdroms.Dlopen();
-};
+}
                                                                        /*}}}*/
 // CDROMMethod::Exit - Unmount the disc if necessary                   /*{{{*/
 // ---------------------------------------------------------------------
@@ -266,7 +266,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
    Res.LastModified = Buf.st_mtime;
    Res.Size = Buf.st_size;
 
-   Hashes Hash;
+   Hashes Hash(Itm->ExpectedHashes);
    FileFd Fd(Res.Filename, FileFd::ReadOnly);
    Hash.AddFD(Fd);
    Res.TakeHashes(Hash);