From: Martin Vidner Date: Wed, 1 Nov 2006 17:48:59 +0000 (+0000) Subject: Shell fix: do not abort on source reinitialization. X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2aa0e82e7e1aff98c3c1f8a87d1d0a2706843597;p=platform%2Fupstream%2Fzypper.git Shell fix: do not abort on source reinitialization. --- diff --git a/src/zmart-sources.cc b/src/zmart-sources.cc index e975495..7e9552f 100644 --- a/src/zmart-sources.cc +++ b/src/zmart-sources.cc @@ -23,6 +23,10 @@ extern Settings gSettings; void cond_init_system_sources () { + static bool done = false; + if (done) + return; + if ( geteuid() != 0 ) { cerr << "Sorry, you need root privileges to use system sources, disabling them..." << endl; gSettings.disable_system_sources = true; @@ -32,6 +36,7 @@ void cond_init_system_sources () if ( ! gSettings.disable_system_sources ) { init_system_sources(); } + done = true; } void init_system_sources() @@ -43,6 +48,8 @@ void init_system_sources() cerr << "Restoring system sources..." << endl; manager->restore("/"); } +// catch (const SourcesAlreadyRestoredException& excpt) { +// } catch (Exception & excpt_r) { ZYPP_CAUGHT (excpt_r);