]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cdrom.cc
merge with lp:~mvo/apt/debian-sid
[apt.git] / apt-pkg / cdrom.cc
index 96106c7a9eceb283509ba17d0c06def03367cda1..891c59836b411dca16c44579f99e4b1297336153 100644 (file)
@@ -160,7 +160,7 @@ bool pkgCdrom::FindPackages(string CD,
    
    return !_error->PendingError();
 }
    
    return !_error->PendingError();
 }
-
+                                                                       /*}}}*/
 // Score - We compute a 'score' for a path                             /*{{{*/
 // ---------------------------------------------------------------------
 /* Paths are scored based on how close they come to what I consider
 // Score - We compute a 'score' for a path                             /*{{{*/
 // ---------------------------------------------------------------------
 /* Paths are scored based on how close they come to what I consider
@@ -210,7 +210,6 @@ int pkgCdrom::Score(string Path)
 
    return Res;
 }
 
    return Res;
 }
-
                                                                        /*}}}*/
 // DropBinaryArch - Dump dirs with a string like /binary-<foo>/                /*{{{*/
 // ---------------------------------------------------------------------
                                                                        /*}}}*/
 // DropBinaryArch - Dump dirs with a string like /binary-<foo>/                /*{{{*/
 // ---------------------------------------------------------------------
@@ -248,8 +247,7 @@ bool pkgCdrom::DropBinaryArch(vector<string> &List)
    
    return true;
 }
    
    return true;
 }
-
-
+                                                                       /*}}}*/
 // DropRepeats - Drop repeated files resulting from symlinks           /*{{{*/
 // ---------------------------------------------------------------------
 /* Here we go and stat every file that we found and strip dup inodes. */
 // DropRepeats - Drop repeated files resulting from symlinks           /*{{{*/
 // ---------------------------------------------------------------------
 /* Here we go and stat every file that we found and strip dup inodes. */
@@ -304,7 +302,6 @@ bool pkgCdrom::DropRepeats(vector<string> &List,const char *Name)
    return true;
 }
                                                                        /*}}}*/
    return true;
 }
                                                                        /*}}}*/
-
 // ReduceSourceList - Takes the path list and reduces it               /*{{{*/
 // ---------------------------------------------------------------------
 /* This takes the list of source list expressed entires and collects
 // ReduceSourceList - Takes the path list and reduces it               /*{{{*/
 // ---------------------------------------------------------------------
 /* This takes the list of source list expressed entires and collects
@@ -513,9 +510,8 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source)
    
    return true;
 }
    
    return true;
 }
-
-
-bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)
+                                                                       /*}}}*/
+bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)               /*{{{*/
 {
    stringstream msg;
 
 {
    stringstream msg;
 
@@ -560,15 +556,21 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)
    }
    if(log) {
       msg.str("");
    }
    if(log) {
       msg.str("");
-      ioprintf(msg, _("Stored label: %s \n"),
-              Database.Find("CD::"+ident).c_str());
+      ioprintf(msg, _("Stored label: %s\n"),
+      Database.Find("CD::"+ident).c_str());
       log->Update(msg.str());
    }
       log->Update(msg.str());
    }
-   return true;
-}
 
 
+   // Unmount and finish
+   if (_config->FindB("APT::CDROM::NoMount",false) == false) {
+      log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST);
+      UnmountCdrom(CDROM);
+   }
 
 
-bool pkgCdrom::Add(pkgCdromStatus *log)
+   return true;
+}
+                                                                       /*}}}*/
+bool pkgCdrom::Add(pkgCdromStatus *log)                                        /*{{{*/
 {
    stringstream msg;
 
 {
    stringstream msg;
 
@@ -668,8 +670,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
    DropRepeats(TransList,"");
    if(log) {
       msg.str("");
    DropRepeats(TransList,"");
    if(log) {
       msg.str("");
-      ioprintf(msg, _("Found %lu package indexes, %lu source indexes, "
-                     "%lu translation indexes and %lu signatures\n"), 
+      ioprintf(msg, _("Found %zu package indexes, %zu source indexes, "
+                     "%zu translation indexes and %zu signatures\n"), 
               List.size(), SourceList.size(), TransList.size(),
               SigList.size());
       log->Update(msg.str(), STEP_SCAN);
               List.size(), SourceList.size(), TransList.size(),
               SigList.size());
       log->Update(msg.str(), STEP_SCAN);
@@ -837,3 +839,4 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
 
    return true;
 }
 
    return true;
 }
+                                                                       /*}}}*/