Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dep_check: use DNF to optimize overlapping || deps (bug 632026) #226

Merged
merged 1 commit into from
Nov 14, 2017

Commits on Nov 14, 2017

  1. dep_check: use DNF to optimize overlapping virtual || deps (bug 632026)

    Deps like these:
    
      || ( foo bar ) || ( bar baz )
    
    Translate to disjunctive normal form (DNF):
    
      || ( ( foo bar ) ( foo baz ) ( bar bar ) ( bar baz ) )
    
    Using DNF, if none of the packages are currently installed,
    then the ( bar bar ) choice will be automatically preferred
    since it is satisfied by the fewest number of packages.
    If the ( foo baz ) choice is already satisfied, then that
    choice will be preferred instead.
    
    Since DNF results in exponential explosion of the formula,
    only use DNF for the parts of the dependencies that have
    overlapping atoms.
    
    In order to simplify the implementation of the dnf_convert
    function, this patch also fixes _expand_new_virtuals to
    normalize results in the same way as use_reduce (with no
    redundant nested lists).
    
    Bug: https://bugs.gentoo.org/632026
    Reviewed-by: Manuel Rüger <mrueg@gentoo.org>
    Reviewed-by: Alec Warner <antarus@gentoo.org>
    zmedico committed Nov 14, 2017
    Configuration menu
    Copy the full SHA
    9fdaf9b View commit details
    Browse the repository at this point in the history