
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael Andres wrote:
On Friday 03 October 2008 15:44:26 Jano Kupec wrote:
Shouldn't $subject return kernel-default-2.6.27-12.1.x86_64 given these are available in the pool?
You can't tell with out looking at the repo priorities. This is the highest key.
There should be a method in Selectable that would select 'the best' object taking into account all the preferences the solver would use (the function could be even made available by the solver), with current policies. Such method could be used instead of curret defaultCandidate() in the candidateObj() method. And zypper would make use of such method a lot. Of course, the solver has the final word as to what will be finally installed, but the candidate returned by such method would be much better than the current semi-random one.
Also in case some candidate is selected to be installed. It will automatically become theObj.
theObj is a ui hack. The ui uses it e.g. in the list views to display a summary. The ui does not care about which objects summary it is. It should be the 'most interesting one'. That's why it always picks a selected item. The one that will get installed is 'interesting'.
OK, but in that case the description of the method was wrong and it fooled me to use the method in zypper. I fixed the description (Michael, pls check it) and will replace the remaining usages in zypper. What still puzzles me, though, is why theObj() returns different objects if i change repo priorities (like in bug #437854): ===================== $ zypper lr -p # │ Alias │ Name │ Enabled │ Refresh │ Priority ───┼─────────────┼─────────────────┼─────────┼─────────┼───────── 1 │ factory │ factory │ Yes │ No │ 99 10 │ zypp_svn │ ZYPP SVN Builds │ Yes │ No │ 90 $ zypper se --match-exact -s zypper S | Name | Type | Version | Arch | Repository - --+--------+------------+-------------+--------+----------------- v | zypper | package | 0.12.12-2.1 | x86_64 | ZYPP SVN Builds v | zypper | package | 0.12.12-1.5 | x86_64 | factory i | zypper | package | 0.12.12-1.4 | x86_64 | (System Packages) $ zypper info zypper Repository: ZYPP SVN Builds Name: zypper Version: 0.12.12-2.1 $ zypper mr -p 120 zypp_svn Repository 'zypp_svn' priority has been set to 120. $ zypper info zypper Repository: factory Name: zypper Version: 0.12.12-1.5 ====================== I can't see anything in the SelectableImpl code doing this. Is the list of available objects sorted in some way? Is it intentional, or it 'just happend'? - -- cheers, jano Ján Kupec YaST team - ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 - ----------------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkkh7CUACgkQgEhGpmN+6QFVHACfUlMGjN7eJ46gJ8khxTAEAkBa gmAAn2XiuLcEFfFgaRXcKWZ0vTFlo1GD =dN/N -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org