Bug#35141: APT does not notice a failing unmount
Package: apt
Hi again,
I just tried to install something from cd but apt was not even able to unmount
the cd-rom. Of course it was my fault but apt did not notice - this might be
to hard for a beginner ;)
Patch included:
Index: cdrom.cc
===================================================================
RCS file: /cvs/deity/apt/methods/cdrom.cc,v
retrieving revision 1.7
diff -u -r1.7 cdrom.cc
--- cdrom.cc 1998/12/22 08:20:55 1.7
+++ cdrom.cc 1999/03/27 23:58:45
@@ -128,7 +128,15 @@
if (NewID == ID)
break;
- UnmountCdrom(CDROM);
+ if (UnmountCdrom(CDROM) == false)
+ {
+ // Unmount failed - perhaps the user has his cwd on the CD?
+
+ _error->Error("Can't unmount the old CD-ROM - perhaps you are "
+ "still working in '%s'?", CDROM.c_str());
+ return false;
+ }
+
if (MediaFail(Get.Host,CDROM) == false)
{
CurrentID = "FAIL";
Reply to: