]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cdrom.cc
merge from apt--mvo
[apt.git] / apt-pkg / cdrom.cc
index b8f94e5b024dd64308b0daba46ab68abe33692c5..0cbdc178fa77eb8463e76181a361710b5489b3b2 100644 (file)
@@ -560,10 +560,17 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)
    }
    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());
    }
+
+   // Unmount and finish
+   if (_config->FindB("APT::CDROM::NoMount",false) == false) {
+      log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST);
+      UnmountCdrom(CDROM);
+   }
+
    return true;
 }