[yast-devel] libzypp-4.6.1: Allow prioritizing repos.
JFYI: libzypp-4.6.1 now supports repo priorities. /etc/zypp/repos.d ----------------- Allow prioritizing repos (yum-priorities) by adding a line priority=N to the .repo file. Where N is an integer number from 1 (highest prio) to 99 (least and default). libzypp-4.6.1 ------------- The priority is stored in class zypp::RepoInfo: namespace zypp { class RepoInfo { /** * Repository priority for solver. * Some number between 1 (highest priority) and 99 (defaultPriority). */ unsigned priority() const; /** * Set repository priority for solver. * A newval_r of 0 sets the default priority. */ RepoInfo & setPriority( unsigned newval_r ); That's how you would e.g. change the priority of a repository in the pool: Repository myfave( sat::Pool::instance().reposFind( "myfave" ) ); if ( myfave ) { myfave.setInfo( myfave.info().setPriority( 2 ) ); } -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Michael Andres napsal(a):
JFYI: libzypp-4.6.1 now supports repo priorities.
/etc/zypp/repos.d ----------------- Allow prioritizing repos (yum-priorities) by adding a line
priority=N
to the .repo file. Where N is an integer number from 1 (highest prio) to 99 (least and default).
That's great, but ... ehm... what does it mean? I mean does it influence the solver or downloading a package in commit? Example situation: repository X with priority 99 containing package foo-1.0 repository Y with priority 90 containing package foo-0.9 repository Z with priority 95 containing package foo-1.0 User selects foo for installation. Which package will be installed? And what users expect to happen when they change priority of a repository? -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
That's great, but ... ehm... what does it mean? I mean does it influence the solver or downloading a package in commit?
Example situation: repository X with priority 99 containing package foo-1.0 repository Y with priority 90 containing package foo-0.9 repository Z with priority 95 containing package foo-1.0
User selects foo for installation. Which package will be installed?
And what users expect to happen when they change priority of a repository? I don't think the solver is influenced yet.
Duncan -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thu, Mar 27, Duncan Mac-Vicar Prett wrote:
That's great, but ... ehm... what does it mean? I mean does it influence the solver or downloading a package in commit?
It influences the solver. The solver will prefer packages from repos with higher priority (which unfortunately is a lower number in yum-speak). Michael <mls> should be able to provide the exact details. AFAIK higher repo priority is prefered over version and arch.
Example situation: repository X with priority 99 containing package foo-1.0 repository Y with priority 90 containing package foo-0.9 repository Z with priority 95 containing package foo-1.0
User selects foo for installation. Which package will be installed?
AFAIK packages will be considered in this order a) package foo-0.9 (priority 90) b) package foo-1.0 (priority 95) c) package foo-1.0 (priority 99) but architecture/vendor of any installed foo may have an influence.
And what users expect to happen when they change priority of a repository? I don't think the solver is influenced yet.
No it works, and if something is wrong with it, it's missconfigured or a solver bug :) -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Michael Andres wrote:
No it works, and if something is wrong with it, it's missconfigured or a solver bug :)
Wow! amazing, I thought the connection with solver's code is there, and what I told to Klaus is not true :-) Duncan -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Michael Andres <ma@suse.de> [Mar 27. 2008 16:38]:
AFAIK packages will be considered in this order
a) package foo-0.9 (priority 90) b) package foo-1.0 (priority 95) c) package foo-1.0 (priority 99)
but architecture/vendor of any installed foo may have an influence.
Just to make the picture complete (or raise the confusion ?), it should be mentioned that we intend to make all 'solver decisions' configurable through a policy plugin. Details have yet to be fleshed out ... Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (4)
-
Duncan Mac-Vicar Prett
-
Klaus Kaempf
-
Ladislav Slezak
-
Michael Andres