Author: lslezak Date: Tue Aug 5 15:26:02 2008 New Revision: 49713 URL: http://svn.opensuse.org/viewcvs/yast?rev=49713&view=rev Log: - fixed searching for the candidate package - prefer better architecture to better version (bnc#413150) - 2.17.4 Modified: trunk/pkg-bindings/VERSION trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/ProvideProcess.cc Modified: trunk/pkg-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/VERSION?rev=49713&r1=49712&r2=49713&view=diff ============================================================================== --- trunk/pkg-bindings/VERSION (original) +++ trunk/pkg-bindings/VERSION Tue Aug 5 15:26:02 2008 @@ -1 +1 @@ -2.17.3 +2.17.4 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=49713&r1=49712&r2=49713&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Tue Aug 5 15:26:02 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Aug 5 14:55:43 CEST 2008 - lslezak@suse.cz + +- fixed searching for the candidate package - prefer better + architecture to better version (bnc#413150) +- 2.17.4 + +------------------------------------------------------------------- Wed Jul 30 11:52:01 CEST 2008 - lslezak@suse.cz - Pkg::Connect() - set LastError() (bnc#280537) Modified: trunk/pkg-bindings/src/ProvideProcess.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/ProvideProcess.cc?rev=49713&r1=49712&r2=49713&view=diff ============================================================================== --- trunk/pkg-bindings/src/ProvideProcess.cc (original) +++ trunk/pkg-bindings/src/ProvideProcess.cc Tue Aug 5 15:26:02 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