[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#611569: apt-cdrom doesn't work on GNU/kFreeBSD



On Tue, Feb 01, 2011 at 02:37:36PM +0100, Robert Millan wrote:
> 2011/1/31 Michael Vogt <mvo@debian.org>:
> > Thanks for your bugreport. On systems where libudev is availalbe we
> > dlopen() it nowdays to figure out the right mount point. On systems
> > where that is not the case apt will just rely on /etc/fstab to find
> > the mountpoint. Could you please check if that has a correct entry?
> 
> apt-cdrom expects an entry with /cdrom mountpoint, but fstab (on
> installed system) provides /media/cdrom0.  If I modify it, then apt-cdrom
> is able to mount the CD.
> 
> Does this mean fstab is incorrect? Then it'd be a bug in D-I.

That is a problem with apt then, I attached a patch that should fix
it and will upload that tonight. I guess the libudev support shadowed
this problem on the other arches.

Cheers,
 Michael
=== modified file 'apt-pkg/cdrom.cc'
--- apt-pkg/cdrom.cc	2010-08-02 19:02:01 +0000
+++ apt-pkg/cdrom.cc	2011-02-01 14:34:01 +0000
@@ -198,7 +198,7 @@
    // 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 @@
    stringstream msg;
 
    // Startup
-   string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
+   string CDROM = _config->FindDir("Acquire::cdrom::mount");
    if (CDROM[0] == '.')
       CDROM= SafeGetCWD() + '/' + CDROM;
 

=== modified file 'apt-pkg/init.cc'
--- apt-pkg/init.cc	2010-09-04 08:46:36 +0000
+++ apt-pkg/init.cc	2011-02-01 14:34:53 +0000
@@ -52,7 +52,7 @@
    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 @@
    // 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

=== modified file 'methods/cdrom.cc'
--- methods/cdrom.cc	2010-02-17 21:40:05 +0000
+++ methods/cdrom.cc	2011-02-01 14:33:47 +0000
@@ -220,7 +220,7 @@
    }
 
    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;
 


Reply to: