[yast-commit] r51833 - in /trunk/pkg-bindings: package/yast2-pkg-bindings.changes src/Package.cc
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.byKindBegin<zypp::Package>(), - selectablePool.byKindEnd<zypp::Package>()) - { - zypp::ui::Selectable::Ptr s = (*it); - if (s) s->unset(level); - } - - for_(it, selectablePool.byKindBegin<zypp::Pattern>(), - selectablePool.byKindEnd<zypp::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.byKindBegin<zypp::Patch>(), - selectablePool.byKindEnd<zypp::Patch>()) - { - zypp::ui::Selectable::Ptr s = (*it); - if (s) s->unset(level); - } - for_(it, selectablePool.byKindBegin<zypp::Product>(), - selectablePool.byKindEnd<zypp::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.byKindBegin<zypp::SrcPackage>(), - selectablePool.byKindEnd<zypp::SrcPackage>()) - { - zypp::ui::Selectable::Ptr s = (*it); - if (s) s->unset(level); - } + // unset all packages, patterns... + ResetAllKind<zypp::Package>(selectablePool, level); + ResetAllKind<zypp::Pattern>(selectablePool, level); + ResetAllKind<zypp::Patch>(selectablePool, level); + ResetAllKind<zypp::Product>(selectablePool, level); + ResetAllKind<zypp::SrcPackage>(selectablePool, level); } /** -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org