Author: lslezak Date: Tue Aug 12 15:51:47 2008 New Revision: 49989 URL: http://svn.opensuse.org/viewcvs/yast?rev=49989&view=rev Log: - fixed searching for the candidate package - prefer better architecture to better version (bnc#413150) Modified: branches/SuSE-Linux-11_0-Branch/pkg-bindings/package/yast2-pkg-bindings.changes branches/SuSE-Linux-11_0-Branch/pkg-bindings/src/ProvideProcess.cc Modified: branches/SuSE-Linux-11_0-Branch/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_0-Branch/pkg-bindings/package/yast2-pkg-bindings.changes?rev=49989&r1=49988&r2=49989&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ branches/SuSE-Linux-11_0-Branch/pkg-bindings/package/yast2-pkg-bindings.changes Tue Aug 12 15:51:47 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Aug 12 15:48:05 CEST 2008 - lslezak@suse.cz + +- fixed searching for the candidate package - prefer better + architecture to better version (bnc#413150) + +------------------------------------------------------------------- Fri Jun 20 14:42:07 CEST 2008 - lslezak@suse.cz - support for patch messages and patch scripts (bnc#401220) Modified: branches/SuSE-Linux-11_0-Branch/pkg-bindings/src/ProvideProcess.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_0-Branch/pkg-bindings/src/ProvideProcess.cc?rev=49989&r1=49988&r2=49989&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/pkg-bindings/src/ProvideProcess.cc (original) +++ branches/SuSE-Linux-11_0-Branch/pkg-bindings/src/ProvideProcess.cc Tue Aug 12 15:51:47 2008 @@ -65,18 +65,24 @@ provider.status().resetTransact(whoWantsIt); } + // get the provider arch + zypp::Arch provider_arch(provider->arch()); + // regarding items which are installable only - if (!provider->arch().compatibleWith( _architecture )) { - y2milestone ("provider %s has incompatible arch '%s'", provider->name().c_str(), provider->arch().asString().c_str()); + if (!provider_arch.compatibleWith( _architecture )) { + y2milestone ("provider %s has incompatible arch '%s'", provider->name().c_str(), provider_arch.asString().c_str()); } else if (!item) { // no provider yet item = provider; } - else if (item->arch().compare( provider->arch() ) < 0) { // provider has better arch + else if (item->arch().compare( provider_arch ) < 0) { // provider has better arch item = provider; } - else if (item->edition().compare( provider->edition() ) < 0) { - item = provider; // provider has better edition + // provider has better edition, but doesn't have worse architecture (item has better or same) + else if (item->edition().compare( provider->edition() ) < 0 + && item->arch().compare( provider_arch ) <= 0) + { + item = provider; } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org