Преглед изворни кода

* apt-pkg/cdrom.cc, apt-pkg/init.cc, methods/cdrom.cc:
- use /media/cdrom as default mountoint (closes: #611569)

Michael Vogt пре 15 година
родитељ
комит
710aba4a9c
4 измењених фајлова са 9 додато и 4 уклоњено
  1. 2 2
      apt-pkg/cdrom.cc
  2. 4 1
      apt-pkg/init.cc
  3. 2 0
      debian/changelog
  4. 1 1
      methods/cdrom.cc

+ 2 - 2
apt-pkg/cdrom.cc

@@ -198,7 +198,7 @@ int pkgCdrom::Score(string Path)
    // a symlink gets a big penalty
    struct stat Buf;
    string statPath = flNotFile(Path);
-   string cdromPath = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
+   string cdromPath = _config->FindDir("Acquire::cdrom::mount");
    while(statPath != cdromPath && statPath != "./") {
       statPath.resize(statPath.size()-1);  // remove the trailing '/'
       if (lstat(statPath.c_str(),&Buf) == 0) {
@@ -509,7 +509,7 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)		/*{{{*/
    stringstream msg;
 
    // Startup
-   string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
+   string CDROM = _config->FindDir("Acquire::cdrom::mount");
    if (CDROM[0] == '.')
       CDROM= SafeGetCWD() + '/' + CDROM;
 

+ 4 - 1
apt-pkg/init.cc

@@ -52,7 +52,7 @@ bool pkgInitConfig(Configuration &Cnf)
    Cnf.Set("Dir::State::lists","lists/");
    Cnf.Set("Dir::State::cdroms","cdroms.list");
    Cnf.Set("Dir::State::mirrors","mirrors/");
-   
+
    // Cache
    Cnf.Set("Dir::Cache","var/cache/apt/");
    Cnf.Set("Dir::Cache::archives","archives/");
@@ -88,6 +88,9 @@ bool pkgInitConfig(Configuration &Cnf)
    // Translation
    Cnf.Set("APT::Acquire::Translation", "environment");
 
+   // Default cdrom mount point
+   Cnf.Set("Acquire::cdrom::mount", "/media/cdrom/");
+
    bool Res = true;
    
    // Read an alternate config file

+ 2 - 0
debian/changelog

@@ -3,6 +3,8 @@ apt (0.8.10.4) UNRELEASED; urgency=low
   * debian/apt.conf.autoremove:
     - never autoremove the GNU/Hurd kernel (closes: #588423), thanks
       to Guillem Jover
+  * apt-pkg/cdrom.cc, apt-pkg/init.cc, methods/cdrom.cc:
+    - use /media/cdrom as default mountoint (closes: #611569)
 
  -- Michael Vogt <mvo@debian.org>  Tue, 01 Feb 2011 09:38:48 +0100
 

+ 1 - 1
methods/cdrom.cc

@@ -220,7 +220,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
    }
 
    bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect", true);
-   CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
+   CDROM = _config->FindDir("Acquire::cdrom::mount");
    if (Debug)
       clog << "Looking for CDROM at " << CDROM << endl;