Author: lslezak Date: Fri Oct 3 13:59:21 2008 New Revision: 51833 URL: http://svn.opensuse.org/viewcvs/yast?rev=51833&view=rev Log: - fixed Pkg::PkgReset() - reset the status (instead of unselect) (bnc#431565) Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/Package.cc Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=51833&r1=51832&r2=51833&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Fri Oct 3 13:59:21 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Oct 3 13:56:41 CEST 2008 - lslezak@suse.cz + +- fixed Pkg::PkgReset() - reset the status (instead of unselect) + (bnc#431565) +- service handling related fixes (bnc#427728) + +------------------------------------------------------------------- Thu Oct 2 12:50:39 CEST 2008 - lslezak@suse.cz - removed Pkg::ServicesSave(), Pkg::ServicesLoad() and Modified: trunk/pkg-bindings/src/Package.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Package.cc?rev=51833&r1=51832&r2=51833&view=diff ============================================================================== --- trunk/pkg-bindings/src/Package.cc (original) +++ trunk/pkg-bindings/src/Package.cc Fri Oct 3 13:59:21 2008 @@ -1799,46 +1799,28 @@ return YCPBoolean(ret); } -void ResetAll(const zypp::ResStatus::TransactByValue &level) +template <class T> +inline void ResetAllKind(zypp::ResPoolProxy &proxy, const zypp::ResStatus::TransactByValue &level) { - // access to the Pool of Selectables - zypp::ResPoolProxy selectablePool(zypp::ResPool::instance().proxy()); - - // unset all packages, patterns... - for_(it, selectablePool.byKindBeginzypp::Package(), - selectablePool.byKindEndzypp::Package()) - { - zypp::ui::Selectable::Ptr s = (*it); - if (s) s->unset(level); - } - - for_(it, selectablePool.byKindBeginzypp::Pattern(), - selectablePool.byKindEndzypp::Pattern()) + for_(it, proxy.byKindBegin<T>(), proxy.byKindEnd<T>()) { zypp::ui::Selectable::Ptr s = (*it); - if (s) s->unset(level); + if (s) s->theObj().status().resetTransact(level); } +} - for_(it, selectablePool.byKindBeginzypp::Patch(), - selectablePool.byKindEndzypp::Patch()) - { - zypp::ui::Selectable::Ptr s = (*it); - if (s) s->unset(level); - } - for_(it, selectablePool.byKindBeginzypp::Product(), - selectablePool.byKindEndzypp::Product()) - { - zypp::ui::Selectable::Ptr s = (*it); - if (s) s->unset(level); - } +void ResetAll(const zypp::ResStatus::TransactByValue &level) +{ + // access to the Pool of Selectables + zypp::ResPoolProxy selectablePool(zypp::ResPool::instance().proxy()); - for_(it, selectablePool.byKindBeginzypp::SrcPackage(), - selectablePool.byKindEndzypp::SrcPackage()) - { - zypp::ui::Selectable::Ptr s = (*it); - if (s) s->unset(level); - } + // unset all packages, patterns... + ResetAllKindzypp::Package(selectablePool, level); + ResetAllKindzypp::Pattern(selectablePool, level); + ResetAllKindzypp::Patch(selectablePool, level); + ResetAllKindzypp::Product(selectablePool, level); + ResetAllKindzypp::SrcPackage(selectablePool, level); } /** -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org