From 2c2b4bbb6b83ff09ad4a767de0c1b137d574fb04 Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Tue, 16 May 2006 07:31:03 +0000 Subject: [PATCH] Added Source_Ref::resStoreInitialized. If we know that noone has seen the resolvables yet, we can skip them too, eg. when deleting a source. (#174840) --- package/libzypp.changes | 8 ++++++++ zypp/Source.cc | 3 +++ zypp/Source.h | 6 ++++++ zypp/source/SourceImpl.h | 8 ++++++++ 4 files changed, 25 insertions(+) diff --git a/package/libzypp.changes b/package/libzypp.changes index 4f4c44f..2a01dad 100644 --- a/package/libzypp.changes +++ b/package/libzypp.changes @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Tue May 16 09:30:45 CEST 2006 - mvidner@suse.cz + +- Added Source_Ref::resStoreInitialized. + If we know that noone has seen the resolvables yet, we can skip + them too, eg. when deleting a source. (#174840) +- rev 3378 + +------------------------------------------------------------------- Mon May 15 12:41:39 CEST 2006 - kkaempf@suse.de - Honor freshens as conditionals independant from the installed/ diff --git a/zypp/Source.cc b/zypp/Source.cc index 29516a3..1d92505 100644 --- a/zypp/Source.cc +++ b/zypp/Source.cc @@ -54,6 +54,9 @@ namespace zypp Source_Ref::NumericId Source_Ref::numericId() const { return _pimpl->numericId(); } + bool Source_Ref::resStoreInitialized() const + { return _pimpl->resStoreInitialized(); } + const ResStore & Source_Ref::resolvables() const { return _pimpl->resolvables(); } diff --git a/zypp/Source.h b/zypp/Source.h index 8a84f73..c63b2f5 100644 --- a/zypp/Source.h +++ b/zypp/Source.h @@ -92,6 +92,12 @@ namespace zypp public: + /** Whether the ResStore is initialized. + * If we know that noone has seen the resolvables yet, we can skip + * them too, eg. when deleting a source. (#174840) + */ + bool resStoreInitialized() const; + /** All resolvables provided by this source. */ const ResStore & resolvables() const; diff --git a/zypp/source/SourceImpl.h b/zypp/source/SourceImpl.h index 9148eee..4f05a86 100644 --- a/zypp/source/SourceImpl.h +++ b/zypp/source/SourceImpl.h @@ -322,6 +322,14 @@ namespace zypp /** Whether the ResStore is initialized. */ bool _res_store_initialized; + public: + /** Whether the ResStore is initialized. + * If we know that noone has seen the resolvables yet, we can skip + * them too, eg. when deleting a source. (#174840) + */ + bool resStoreInitialized () const + { return _res_store_initialized; } + private: /** Helper indicating creation of nullimpl. */ struct null {}; -- 2.7.4