Author: jkupec Date: Thu May 22 10:27:27 2008 New Revision: 10183 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10183&view=rev Log: - ZYPP_READONLY_HACK ported from code 10 (until we integrate InterProcessMutex) Modified: trunk/zypper/src/zypper.cc Modified: trunk/zypper/src/zypper.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=10183&am... ============================================================================== --- trunk/zypper/src/zypper.cc (original) +++ trunk/zypper/src/zypper.cc Thu May 22 10:27:27 2008 @@ -1876,13 +1876,18 @@ } // here come commands that need the lock - try { - if (command() == ZypperCommand::LIST_REPOS) + try + { + const char *roh = getenv("ZYPP_READONLY_HACK"); + if (roh != NULL && roh[0] == '1') + zypp_readonly_hack::IWantIt (); + else if (command() == ZypperCommand::LIST_REPOS) zypp_readonly_hack::IWantIt (); // #247001, #302152 - + God = zypp::getZYpp(); } - catch (ZYppFactoryException & excpt_r) { + catch (ZYppFactoryException & excpt_r) + { ZYPP_CAUGHT (excpt_r); ERR << "A ZYpp transaction is already in progress." << endl; out().error( @@ -1894,7 +1899,8 @@ setExitCode(ZYPPER_EXIT_ERR_ZYPP); throw (ExitRequestException("ZYpp locked")); } - catch (Exception & excpt_r) { + catch (Exception & excpt_r) + { ZYPP_CAUGHT (excpt_r); out().error(excpt_r.msg()); setExitCode(ZYPPER_EXIT_ERR_ZYPP); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org