From 6a34dd455595d46738b9a6480ff09875c3ae0b38 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Wed, 26 Feb 2014 15:05:17 +0100 Subject: [PATCH] Ignore failed-eject-exception on media change (bnc#865705) --- zypp/MediaSetAccess.cc | 13 +++++++++---- zypp/media/MediaCD.cc | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/zypp/MediaSetAccess.cc b/zypp/MediaSetAccess.cc index 240b60b..a7c5f8d 100644 --- a/zypp/MediaSetAccess.cc +++ b/zypp/MediaSetAccess.cc @@ -299,10 +299,15 @@ IMPL_PTR_TYPE(MediaSetAccess); else if ( user == media::MediaChangeReport::EJECT ) { DBG << "Eject: try to release" << endl; - media_mgr.releaseAll(); - // eject - media_mgr.release (media, - devindex < devices.size() ? devices[devindex] : ""); + try + { + media_mgr.releaseAll(); + media_mgr.release (media, devindex < devices.size() ? devices[devindex] : ""); + } + catch ( const Exception & e) + { + ZYPP_CAUGHT(e); + } } else if ( user == media::MediaChangeReport::RETRY || user == media::MediaChangeReport::CHANGE_URL ) diff --git a/zypp/media/MediaCD.cc b/zypp/media/MediaCD.cc index d1c3590..172ea3e 100644 --- a/zypp/media/MediaCD.cc +++ b/zypp/media/MediaCD.cc @@ -41,7 +41,7 @@ extern "C" /* ** if to throw exception on eject errors or ignore them */ -#define REPORT_EJECT_ERRORS 1 +#define REPORT_EJECT_ERRORS 0 /* ** If defined to the full path of the eject utility, -- 2.7.4