From: Michael Vogt Date: Mon, 12 Sep 2005 13:51:58 +0000 (+0000) Subject: * backported a fix from apt-cdrom so that it umounts it's cdrom again in case of... X-Git-Tag: 0.7.24ubuntu1~296 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/1c19f1a34b96b7cc21798c47ef572661f103aec9?ds=inline;hp=-c * backported a fix from apt-cdrom so that it umounts it's cdrom again in case of error 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 --- 1c19f1a34b96b7cc21798c47ef572661f103aec9 diff --combined apt-pkg/cdrom.cc index ca74aa685,ce1beb39b..d7ef844a2 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@@ -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()); } @@@ -647,8 -650,11 +647,11 @@@ 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; @@@ -684,7 -690,10 +687,10 @@@ 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)) { @@@ -757,7 -766,10 +763,10 @@@ { string::size_type Space = (*I).find(' '); if (Space == string::npos) + { + UnmountCdrom(CDROM); return _error->Error("Internal error"); + } if(log) { msg.str(""); @@@ -771,7 -783,10 +780,10 @@@ { 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 06a357661,e88689667..c1a625b97 --- a/debian/changelog +++ b/debian/changelog @@@ -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 Mon, 12 Sep 2005 13:45:53 +0200 + -- Michael Vogt 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 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 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 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 Tue, 23 Aug 2005 19:44:55 +0200 + +apt (0.6.40.1ubuntu1) breezy; urgency=low + + * Synchronize with Debian + + -- Michael Vogt Fri, 5 Aug 2005 14:20:56 +0200 apt (0.6.40.1) unstable; urgency=low @@@ -53,12 -45,6 +56,12 @@@ -- Michael Vogt Fri, 5 Aug 2005 13:24:58 +0200 +apt (0.6.40ubuntu1) breezy; urgency=low + + * Synchronize with Debian + + -- Matt Zimmerman 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 @@@ -74,39 -60,6 +77,39 @@@ -- Matt Zimmerman 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 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 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 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 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 @@@ -117,14 -70,7 +120,14 @@@ * Update priority of apt-utils to important, to match the override file * Install only one keyring on each branch (Closes: #316119) - -- Matt Zimmerman Tue, 28 Jun 2005 11:51:09 -0700 + -- Matt Zimmerman 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 Sat, 25 Jun 2005 16:52:41 -0700 apt (0.6.38) unstable; urgency=low