]> git.saurik.com Git - apt.git/commitdiff
* backported a fix from apt-cdrom so that it umounts it's cdrom again in case of...
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 12 Sep 2005 13:51:58 +0000 (13:51 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 12 Sep 2005 13:51:58 +0000 (13:51 +0000)
Patches applied:

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-55
   * fix apt-pkg/cdrom.cc to umount the cdrom again if anything fails

1  2 
apt-pkg/cdrom.cc
debian/changelog

diff --combined apt-pkg/cdrom.cc
index ca74aa685c35d88716780603b35a19b88ea50626,ce1beb39b8c3b24084fadc155cf2efa2573671e0..d7ef844a2fa877cfcb3c449ff05eed94e0c69a3c
@@@ -422,6 -422,9 +422,6 @@@ bool pkgCdrom::WriteSourceList(string N
     {      
        F.getline(Buffer,sizeof(Buffer));
        CurLine++;
 -      if (F.fail() && !F.eof())
 -       return _error->Error(_("Line %u too long in source list %s."),
 -                            CurLine,File.c_str());
        _strtabexpand(Buffer,sizeof(Buffer));
        _strstrip(Buffer);
              
@@@ -564,7 -567,7 +564,7 @@@ bool pkgCdrom::Add(pkgCdromStatus *log
     string DFile = _config->FindFile("Dir::State::cdroms");
     if (FileExists(DFile) == true)
     {
-       if (ReadConfigFile(Database,DFile) == false)
+       if (ReadConfigFile(Database,DFile) == false) 
         return _error->Error("Unable to read the cdrom database %s",
                              DFile.c_str());
     }
        log->Update(msg.str(), STEP_SCAN);
     }
  
-    if (List.size() == 0 && SourceList.size() == 0)
+    if (List.size() == 0 && SourceList.size() == 0) 
+    {
+       UnmountCdrom(CDROM);
        return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc");
+    }
  
     // Check if the CD is in the database
     string Name;
          Name.empty() == true)
        {
         if(!log) 
+          {
+           UnmountCdrom(CDROM);
            return _error->Error("No disc name found and no way to ask for it");
+        }
  
         while(true) {
            if(!log->AskCdromName(Name)) {
     {
        string::size_type Space = (*I).find(' ');
        if (Space == string::npos)
+       {
+        UnmountCdrom(CDROM);
         return _error->Error("Internal error");
+       }
  
        if(log) {
         msg.str("");
     {
        string::size_type Space = (*I).find(' ');
        if (Space == string::npos)
+       {
+        UnmountCdrom(CDROM);
         return _error->Error("Internal error");
+       }
  
        if(log) {
         msg.str("");
diff --combined debian/changelog
index 06a35766116221354a272a8ac7b8d3fb25c332b8,e88689667993fb591ea76c22c7517c1ffcf4506c..c1a625b97ac4752d10de691ea7ea803b3124840a
@@@ -1,48 -1,40 +1,51 @@@
 -apt (0.6.41.1) unstable; urgency=low
 +apt (0.6.40.1ubuntu5) breezy; urgency=low
  
 -  * apt-pkg/cdrom.cc:
 +  * Cheery picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-{50,51}.
 +    This adds media-change reporting to the apt status-fd (ubuntu #15213)
++  * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-55:
++    apt-pkg/cdrom.cc:
+     - unmount the cdrom when apt failed to locate any package files
  
 - -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 12 Sep 2005 13:45:53 +0200
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 12 Sep 2005 15:44:26 +0200
  
 -apt (0.6.41) unstable; urgency=low
 +apt (0.6.40.1ubuntu4) breezy; urgency=low
 +
 +  * debian/apt.cron.daily:
 +    - fix a embarrassing typo
 +  
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed,  7 Sep 2005 10:10:37 +0200
 +
 +apt (0.6.40.1ubuntu3) breezy; urgency=low
 +
 +  * debian/apt.cron.daily:
 +    - use the ctime as well when figuring what packages need to
 +      be removed. This fixes the problem that packages copied with    
 +      "cp -a" (e.g. from the installer) have old mtimes (ubuntu #14504)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue,  6 Sep 2005 18:30:46 +0200
 +
 +apt (0.6.40.1ubuntu2) breezy; urgency=low
  
    * improved the support for "error" and "conffile" reporting from
      dpkg, added the format to README.progress-reporting
    * added README.progress-reporting to the apt-doc package
 -  * improved the network timeout handling, if a index file from a 
 -    sources.list times out or EAI_AGAIN is returned from getaddrinfo, 
 -    don't try to get the other files from that entry
 -  * Support architecture-specific extra overrides
 -    (closes: #225947). Thanks to  Anthony Towns for idea and
 -    the patch, thanks to Colin Watson for testing it.
 -  * Javier Fernandez-Sanguino Pen~a:
 -    - Added a first version of an apt-secure.8 manpage, and modified
 -      apt-key and apt.end accordingly. Also added the 'update'
 -      argument to apt-key which was previously not documented 
 -      (Closes: #322120)
 -  * Andreas Pakulat:
 -    - added example apt-ftparchive.conf file to doc/examples 
 -      (closes: #322483)
 -  * Fix a incorrect example in the man-page (closes: #282918)
 -  * Fix a bug for very long lines in the apt-cdrom code (closes: #280356)
 -  * Fix a manual page bug (closes: #316314)
    * Do md5sum checking for file and cdrom method (closes: #319142)
    * Change pkgPolicy::Pin from private to protected to let subclasses
      access it too (closes: #321799)
 -  * add default constructor for PrvIterator (closes: #322267)
 -  * Reread status configuration on debSystem::Initialize() 
 -    (needed for apt-proxy, thanks to Otavio for this patch)
 -  
 - -- Michael Vogt <mvo@debian.org>  Mon,  5 Sep 2005 22:59:03 +0200
 +  * methods/connect.cc:
 +    - send failure reason for EAI_AGAIN (TmpResolveFailure) to acuire-item
 +  * apt-pkg/acquire-item.cc:
 +    - fail early if a FailReason is TmpResolveFailure (avoids hangs during
 +      the install when no network is available)
 +  * merged michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 23 Aug 2005 19:44:55 +0200
 +
 +apt (0.6.40.1ubuntu1) breezy; urgency=low
 +
 +  * Synchronize with Debian
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Fri,  5 Aug 2005 14:20:56 +0200
  
  apt (0.6.40.1) unstable; urgency=low
  
  
   -- Michael Vogt <mvo@debian.org>  Fri,  5 Aug 2005 13:24:58 +0200
  
 +apt (0.6.40ubuntu1) breezy; urgency=low
 +
 +  * Synchronize with Debian
 +
 + -- Matt Zimmerman <mdz@ubuntu.com>  Thu,  4 Aug 2005 15:53:22 -0700
 +
  apt (0.6.40) unstable; urgency=low
  
    * Patch from Jordi Mallach to mark some additional strings for translation
  
   -- Matt Zimmerman <mdz@debian.org>  Thu, 28 Jul 2005 11:57:32 -0700
  
 +apt (0.6.39ubuntu4) breezy; urgency=low
 +
 +  * Fix keyring paths in apt-key, apt.postinst (I swear I remember doing this
 +    before...)
 +
 + -- Matt Zimmerman <mdz@ubuntu.com>  Wed, 29 Jun 2005 08:39:17 -0700
 +
 +apt (0.6.39ubuntu3) breezy; urgency=low
 +
 +  * Fix keyring locations for Ubuntu in apt-key too.
 +
 + -- Colin Watson <cjwatson@ubuntu.com>  Wed, 29 Jun 2005 14:45:36 +0100
 +
 +apt (0.6.39ubuntu2) breezy; urgency=low
 +
 +  * Install ubuntu-archive.gpg rather than debian-archive.gpg as
 +    /etc/apt/trusted.gpg.
 +
 + -- Colin Watson <cjwatson@ubuntu.com>  Wed, 29 Jun 2005 11:53:34 +0100
 +
 +apt (0.6.39ubuntu1) breezy; urgency=low
 +
 +  * Michael Vogt
 +    - Change debian/bugscript to use #!/bin/bash (Closes: #313402)
 +    - Fix a incorrect example in the man-page (closes: #282918)
 +    - Support architecture-specific extra overrides
 +      (closes: #225947). Thanks to  Anthony Towns for idea and
 +      the patch, thanks to Colin Watson for testing it.
 +    - better report network timeouts from the methods to the acuire code,
 +      only timeout once per sources.list line
 +
 + -- Matt Zimmerman <mdz@ubuntu.com>  Tue, 28 Jun 2005 11:52:24 -0700
 +
  apt (0.6.39) unstable; urgency=low
  
    * Welsh translation update: daf@muse.19inch.net--2005/apt--main--0--patch-6
    * Update priority of apt-utils to important, to match the override file
    * Install only one keyring on each branch (Closes: #316119)
  
 - -- Matt Zimmerman <mdz@debian.org>  Tue, 28 Jun 2005 11:51:09 -0700
 + -- Matt Zimmerman <mdz@debian.org>  Tue, 28 Jun 2005 11:35:21 -0700
 +
 +apt (0.6.38ubuntu1) breezy; urgency=low
 +
 +  * First release from Ubuntu branch
 +  * Merge with --main--0, switch back to Ubuntu keyring
 +
 + -- Matt Zimmerman <mdz@ubuntu.com>  Sat, 25 Jun 2005 16:52:41 -0700
  
  apt (0.6.38) unstable; urgency=low