From: Duncan Mac-Vicar P Date: Sat, 2 Feb 2008 03:32:33 +0000 (+0000) Subject: remove some interfaces, cleanup X-Git-Tag: BASE-SuSE-Linux-11_0-Branch~586^2~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e231bb2cdd5bfb20849f76e6e9fa7fea63e2da6;p=platform%2Fupstream%2Flibzypp.git remove some interfaces, cleanup --- diff --git a/tests/zypp/RepoStatus_test.cc b/tests/zypp/RepoStatus_test.cc index c9883d0..e7138a7 100644 --- a/tests/zypp/RepoStatus_test.cc +++ b/tests/zypp/RepoStatus_test.cc @@ -16,7 +16,6 @@ using namespace boost::unit_test::log; using namespace std; using namespace zypp; using namespace zypp::filesystem; -using namespace zypp::repo; void repostatus_test() { diff --git a/zypp/RepoManager.cc b/zypp/RepoManager.cc index 32bb1d1..a4ad715 100644 --- a/zypp/RepoManager.cc +++ b/zypp/RepoManager.cc @@ -740,11 +740,6 @@ namespace zypp case RepoType::RPMMD_e : case RepoType::YAST2_e : { -// string cmd = "repo2solv.sh \""; -// cmd += rawpath.asString() + "\" > " + solvfile.asString(); -// int ret = system (cmd.c_str()); -// if (WIFEXITED (ret) && WEXITSTATUS (ret) != 0) -// ZYPP_THROW(RepoUnknownTypeException()); MIL << "Executing solv converter" << endl; string cmd( str::form( "/usr/bin/repo2solv.sh \"%s\" > %s", rawpath.asString().c_str(), solvfile.asString().c_str() ) ); ExternalProgram prog( cmd, ExternalProgram::Stderr_To_Stdout ); @@ -752,6 +747,8 @@ namespace zypp MIL << " " << output; } int ret = prog.close(); + if ( ret != 0 ) + ZYPP_THROW(RepoUnknownTypeException()); } break; default: diff --git a/zypp/Target.cc b/zypp/Target.cc index 12d8057..3d61bec 100644 --- a/zypp/Target.cc +++ b/zypp/Target.cc @@ -67,9 +67,6 @@ namespace zypp void Target::load() { _pimpl->load(); } - const ResStore & Target::resolvables() - { return _pimpl->resolvables(); } - ResStore::resfilter_const_iterator Target::byKindBegin( const ResObject::Kind & kind_r ) const { return _pimpl->byKindBegin( kind_r ); } @@ -79,15 +76,6 @@ namespace zypp target::rpm::RpmDb & Target::rpmDb() { return _pimpl->rpm(); } -#ifndef STORAGE_DISABLED - /** enables the storage target */ - bool Target::isStorageEnabled() const - { return _pimpl->isStorageEnabled(); } - - void Target::enableStorage(const Pathname &root_r) - { _pimpl->enableStorage(root_r); } -#endif - Pathname Target::root() const { return _pimpl->root(); } diff --git a/zypp/Target.h b/zypp/Target.h index 15acdef..baa23e8 100644 --- a/zypp/Target.h +++ b/zypp/Target.h @@ -55,9 +55,6 @@ namespace zypp public: - /** All resolvables provided by the target. */ - const ResStore & resolvables(); - /** * load resolvables into the pool */ @@ -92,12 +89,6 @@ namespace zypp ResObject::constPtr whoOwnsFile (const std::string & path_str) const; -#ifndef STORAGE_DISABLED - /** enables the storage target */ - bool isStorageEnabled() const; - void enableStorage(const Pathname &root_r); -#endif - /** Set the log file for target */ bool setInstallationLogfile(const Pathname & path_r); diff --git a/zypp/target/TargetImpl.cc b/zypp/target/TargetImpl.cc index 51f0c8b..5e062df 100644 --- a/zypp/target/TargetImpl.cc +++ b/zypp/target/TargetImpl.cc @@ -281,7 +281,7 @@ namespace zypp // METHOD TYPE : Ctor // TargetImpl::TargetImpl(const Pathname & root_r) - : _root(root_r), _storage_enabled(false) + : _root(root_r) { _rpm.initDatabase(root_r); MIL << "Initialized target on " << _root << endl; @@ -298,11 +298,6 @@ namespace zypp MIL << "Targets closed" << endl; } - bool TargetImpl::isStorageEnabled() const - { - return _storage_enabled; - } - void TargetImpl::load() { Pathname rpmsolv = _root + ZConfig::instance().repoCachePath() + "_rpm.solv"; @@ -344,24 +339,14 @@ namespace zypp MIL << "Target loaded: " << system.solvablesSize() << " resolvables" << endl; } - void TargetImpl::enableStorage(const Pathname &root_r) - { - } - Pathname TargetImpl::root() const { return _root; } - void TargetImpl::loadKindResolvables( const Resolvable::Kind kind ) - { - // FIXME remove this - } - ResStore::resfilter_const_iterator TargetImpl::byKindBegin( const ResObject::Kind & kind_r ) const { TargetImpl *ptr = const_cast(this); - ptr->loadKindResolvables(kind_r); resfilter::ResFilter filter = ByKind(kind_r); return make_filter_iterator( filter, _store.begin(), _store.end() ); } @@ -369,16 +354,10 @@ namespace zypp ResStore::resfilter_const_iterator TargetImpl::byKindEnd( const ResObject::Kind & kind_r ) const { TargetImpl *ptr = const_cast(this); - ptr->loadKindResolvables(kind_r); resfilter::ResFilter filter = ByKind(kind_r); return make_filter_iterator( filter, _store.end(), _store.end() ); } - const ResStore & TargetImpl::resolvables() - { - return _store; - } - void TargetImpl::reset() { // FIXME remove diff --git a/zypp/target/TargetImpl.h b/zypp/target/TargetImpl.h index e504e3d..e0cae34 100644 --- a/zypp/target/TargetImpl.h +++ b/zypp/target/TargetImpl.h @@ -73,9 +73,6 @@ namespace zypp public: - /** All resolvables in the target. */ - const ResStore & resolvables(); - /** * load resolvables of certain kind in the internal store * and return a iterator @@ -105,10 +102,6 @@ namespace zypp return res._result; } - /** enables the storage target */ - bool isStorageEnabled() const; - void enableStorage(const Pathname &root_r); - /** Commit ordered changes * @param pool_r only needed for #160792 * @return uncommitted ones (due to error) @@ -151,18 +144,12 @@ namespace zypp void reset(); protected: - void loadKindResolvables( const Resolvable::Kind kind ); /** All resolvables provided by the target. */ ResStore _store; /** Path to the target */ Pathname _root; /** RPM database */ rpm::RpmDb _rpm; -#ifndef STORAGE_DISABLED - zypp::storage::PersistentStorage _storage; - bool _storage_enabled; - std::map< const Resolvable::Kind, DefaultFalseBool> _resstore_loaded; -#endif private: /** Null implementation */ static TargetImpl_Ptr _nullimpl; diff --git a/zypp/zypp_detail/ZYppImpl.cc b/zypp/zypp_detail/ZYppImpl.cc index 89f5a58..ac113ae 100644 --- a/zypp/zypp_detail/ZYppImpl.cc +++ b/zypp/zypp_detail/ZYppImpl.cc @@ -216,7 +216,6 @@ namespace zypp #endif } _target = new Target( root ); - _target->enableStorage( root ); } void ZYppImpl::finishTarget()