Author: jkupec Date: Fri Jul 27 18:08:18 2007 New Revision: 6271 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6271&view=rev Log: - don't request media change if the media is not changeable (like http) Modified: trunk/libzypp/zypp/MediaSetAccess.cc Modified: trunk/libzypp/zypp/MediaSetAccess.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/MediaSetAccess.cc?rev=6271&r1=6270&r2=6271&view=diff ============================================================================== --- trunk/libzypp/zypp/MediaSetAccess.cc (original) +++ trunk/libzypp/zypp/MediaSetAccess.cc Fri Jul 27 18:08:18 2007 @@ -242,13 +242,18 @@ reason = media::MediaChangeReport::WRONG; } - user = checkonly ? media::MediaChangeReport::ABORT : - report->requestMedia ( - Repository::noRepository, - media_nr, - reason, - excp.asUserString() - ); + // request media change, if the media is changeable and this is + // not just a check, otherwise just abort + if (checkonly || !media_mgr.isChangeable(media)) + user = media::MediaChangeReport::ABORT; + else + user = + report->requestMedia ( + Repository::noRepository, + media_nr, + reason, + excp.asUserString() + ); DBG << "ProvideFile exception caught, callback answer: " << user << endl; @@ -376,10 +381,18 @@ reason = media::MediaChangeReport::WRONG; } - user = report->requestMedia(Repository::noRepository, - media_nr, - reason, - excp.asUserString()); + + // request media change, if the media is changeable, otherwise just abort + if (media_mgr.isChangeable(_media)) + user = + report->requestMedia( + Repository::noRepository, + media_nr, + reason, + excp.asUserString() + ); + else + user = media::MediaChangeReport::ABORT; DBG << "ProvideFile exception caught, callback answer: " << user << endl; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org