X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/80ada697b4aae3d41ba85fa365ee9b8b77387f06..4344b05c9b472b84752b8f9f75a372ce1356bcd9:/apt-pkg/cdrom.cc?ds=sidebyside diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index b42c82dd0..4a688a5e1 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -1,9 +1,6 @@ /* */ -#ifdef __GNUG__ -#pragma implementation "apt-pkg/cdrom.h" -#endif #include #include #include @@ -18,6 +15,7 @@ #include #include #include +#include #include "indexcopy.h" @@ -679,7 +677,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log) if (List.size() == 0 && SourceList.size() == 0) { - UnmountCdrom(CDROM); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc"); } @@ -706,7 +705,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) if(log) { msg.str(""); - ioprintf(msg, "Found label '%s'\n", Name.c_str()); + ioprintf(msg, _("Found label '%s'\n"), Name.c_str()); log->Update(msg.str()); } Database.Set("CD::" + ID + "::Label",Name); @@ -718,7 +717,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log) { if(!log) { - UnmountCdrom(CDROM); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); return _error->Error("No disc name found and no way to ask for it"); } @@ -796,7 +796,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log) string::size_type Space = (*I).find(' '); if (Space == string::npos) { - UnmountCdrom(CDROM); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); return _error->Error("Internal error"); } @@ -813,7 +814,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log) string::size_type Space = (*I).find(' '); if (Space == string::npos) { - UnmountCdrom(CDROM); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); return _error->Error("Internal error"); } @@ -829,7 +831,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) // Unmount and finish if (_config->FindB("APT::CDROM::NoMount",false) == false) { - log->Update(_("Unmounting CD-ROM..."), STEP_LAST); + log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST); UnmountCdrom(CDROM); }