Author: lslezak Date: Tue Aug 19 09:29:10 2008 New Revision: 50192 URL: http://svn.opensuse.org/viewcvs/yast?rev=50192&view=rev Log: - ui::Selectable in Pkg::PkgSrcInstall() 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=50192&r1=50191&r2=50192&view=diff ============================================================================== --- branches/tmp/lslezak/pkg-bindings/src/Package.cc (original) +++ branches/tmp/lslezak/pkg-bindings/src/Package.cc Tue Aug 19 09:29:10 2008 @@ -1767,6 +1767,10 @@ { ret = selectable->setToInstall(whoWantsIt); } + else + { + y2error("Package %s is not available", name.c_str()); + } return YCPBoolean(ret); } @@ -1786,9 +1790,19 @@ if (name.empty()) return YCPBoolean (false); - // ensure installation of the 'best' architecture + bool ret = false; + zypp::ui::Selectable::Ptr selectable = zypp::ui::Selectable::get(zypp::ResKind::srcpackage, name); + + if (selectable) + { + ret = selectable->setToInstall(whoWantsIt); + } + else + { + y2error("Source package %s is not available", name.c_str()); + } - return YCPBoolean( DoProvideNameKind( name, zypp::ResKind::srcpackage, zypp::ZConfig::instance().systemArchitecture(), "" ) ); + return YCPBoolean(ret); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org