Author: lslezak Date: Mon Aug 18 16:10:52 2008 New Revision: 50184 URL: http://svn.opensuse.org/viewcvs/yast?rev=50184&view=rev Log: - ui::Selectable in Pkg::PkgMarkLicenseConfirmed() Modified: branches/tmp/lslezak/pkg-bindings/src/Package.cc Modified: branches/tmp/lslezak/pkg-bindings/src/Package.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/pkg-bindings/src/Package.cc?rev=50184&r1=50183&r2=50184&view=diff ============================================================================== --- branches/tmp/lslezak/pkg-bindings/src/Package.cc (original) +++ branches/tmp/lslezak/pkg-bindings/src/Package.cc Mon Aug 18 16:10:52 2008 @@ -2352,21 +2352,12 @@ { try { - for (zypp::ResPool::byIdent_iterator it = zypp_ptr()->pool().byIdentBeginzypp::Package(pkgname); - it != zypp_ptr()->pool().byIdentEndzypp::Package(pkgname); - ++it) - { - // is it a package? - zypp::Package::constPtr package = zypp::asKindzypp::Package( it->resolvable() ); + zypp::ui::Selectable::Ptr s = zypp::ui::Selectable::get(pkgname); - // a package scheduled for installation, with unconfirmed license, not installed yet - if (package && it->status().isToBeInstalled() && !it->status().isLicenceConfirmed() - && !it->status().isInstalled()) - { - // confirm the license - it->status().setLicenceConfirmed(true); - return YCPBoolean( true ); - } + if (s && s->toInstall() && !s->hasLicenceConfirmed()) + { + s->setLicenceConfirmed(); + return YCPBoolean(true); } } catch (...) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org