[Yum] package pinning and repository scoring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
 So I looked at apt's package pinning in more detail tonight and I think
I understand what bothers me about it.

it combines two concepts and makes the config format REALLY hard.

concept one:
determining which repository is considered 'better' for any one package
that both repositories have. For example:
 two repositories: repo1, repo2

   repo1 packages:
   foo
   bar
   baz
   
   repo2 packages:
   foo
   quux
   doe

 in the default mode pkgpolicy=newest. yum compares repo1.foo vs
repo2.foo to see which of them is newer in terms of their version.
 if pkgpolicy=last then yum sorts the repositories and the last one in
the sort order is used regardless of its version.
 so for our example repo1.foo vs repo2.foo - repo2.foo would always be
used b/c repo1 sorts before repo2.

 So if we're trying to give a general score to a repository we just give
a score based on any number of arbitrary criteria. Then the repository
with the highest score is used for any duplicated packages.

concept two:
 We have a bunch of packages and a bunch of repositories and we want to
say which packages should be drawn from which repositories.
  In this concept there would need to be some way of listing packages
and specifying which repositories should be used for those packages.


So concept one is best fulfilled in the existent yum.conf file
per-repository by providing a scoring mechanism for the repository.

concept two is probably best suited to an additional config file that
specifies package identifiers versus the repository they should be drawn
from.

So if the key:value pair is pkg:repo then the config should in this
other config file. but if the key:value pair is repo:pkg then the config
should be in the current yum.conf.

the file format in concept two if kinda tricky b/c on one hand it is
could just be a simple format like yum.conf but on the other hand the
package identifiers could be many and varied so a flexible syntax would
be useful.

suggestions?

-sv



[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux