Procházet zdrojové kódy

Check the currently mounted cdrom, to see if it's the o...
Author: doogie
Date: 2002-11-22 07:26:10 GMT
Check the currently mounted cdrom, to see if it's the one we are interested
in.

Arch Librarian před 22 roky
rodič
revize
f7dd079fa2
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 2 0
      debian/changelog
  2. 2 4
      methods/cdrom.cc

+ 2 - 0
debian/changelog

@@ -74,6 +74,8 @@ apt (0.5.5) unstable; urgency=low
   * s/st_mtime/mtime/ on our local stat structure in apt-ftparchive, to
   * s/st_mtime/mtime/ on our local stat structure in apt-ftparchive, to
     support compliation on platforms where st_mtime is a macro.  Closes:
     support compliation on platforms where st_mtime is a macro.  Closes:
     #165518
     #165518
+  * Check the currently mounted cdrom, to see if it's the one we are
+    interested in.  Closes: #154602
 
 
  -- Jason Gunthorpe <jgg@debian.org>  Sun, 15 Sep 2002 17:16:59 -0600
  -- Jason Gunthorpe <jgg@debian.org>  Sun, 15 Sep 2002 17:16:59 -0600
 
 

+ 2 - 4
methods/cdrom.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: cdrom.cc,v 1.18 2001/05/22 04:01:41 jgg Exp $
+// $Id: cdrom.cc,v 1.19 2002/11/22 07:26:10 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    CDROM URI method for APT
    CDROM URI method for APT
@@ -137,6 +137,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
    while (CurrentID.empty() == true)
    while (CurrentID.empty() == true)
    {
    {
       bool Hit = false;
       bool Hit = false;
+      Mounted = MountCdrom(CDROM);
       for (unsigned int Version = 2; Version != 0; Version--)
       for (unsigned int Version = 2; Version != 0; Version--)
       {
       {
 	 if (IdentCdrom(CDROM,NewID,Version) == false)
 	 if (IdentCdrom(CDROM,NewID,Version) == false)
@@ -166,9 +167,6 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
 	 Fail("Wrong CD",true);
 	 Fail("Wrong CD",true);
 	 return true;
 	 return true;
       }
       }
-      
-      MountCdrom(CDROM);
-      Mounted = true;
    }
    }
    
    
    // Found a CD
    // Found a CD