Coder Social home page Coder Social logo

Comments (9)

mlschroe avatar mlschroe commented on June 6, 2024

But isn't that already what libsolv does? It tries to install all recommended packages, unless it's not possible. And there's already a flag to turn this off (SOLVER_FLAG_IGNORE_RECOMMENDED).

from libsolv.

kirgene avatar kirgene commented on June 6, 2024

Actually it doesn't.
The following test fails:

repo system 0 testtags <inline>
#>=Pkg: A 1 0 all
#>=Pkg: C 1 0 all
#>=Pkg: Z 1 0 all
#>=Rec: A = 1-0
#>=Rec: C = 1-0
repo test 0 testtags <inline>
#>=Pkg: A 2 0 all
#>=Pkg: B 1 1 all
#>=Pkg: C 2 0 all
#>=Pkg: Z 2 0 all
#>=Rec: A = 2-0
#>=Rec: B = 1-1
#>=Rec: C = 2-0
system i686 deb system

job install name Z [orupdate]
result transaction,problems <inline>
#>install B-1-1.all@test
#>upgrade A-1-0.all@system A-2-0.all@test
#>upgrade C-1-0.all@system C-2-0.all@test
#>upgrade Z-1-0.all@system Z-2-0.all@test

with the result:

Results differ:
-upgrade A-1-0.all@system A-2-0.all@test
-upgrade C-1-0.all@system C-2-0.all@test

from libsolv.

mlschroe avatar mlschroe commented on June 6, 2024

Yes, that's true. It solves your example that way because it currently has a focus on doing minimal changes to your system, and thus it prefers not updating A and C and breaking the recommends dependency over the update. Is this some real issue that needs fixing?

from libsolv.

mlschroe avatar mlschroe commented on June 6, 2024

I can add a solver flag that makes it add weak rules for the recommends, this will make the solver try hard to fulfill all recommends.

from libsolv.

kirgene avatar kirgene commented on June 6, 2024

Good idea.

from libsolv.

adelcast avatar adelcast commented on June 6, 2024

The libsolv backend of opkg has the same problem, it's a regression from when the internal solver is used. A flag that will allow opkg to keep the same behavior across backends would be fantastic!

https://bugzilla.yoctoproject.org/show_bug.cgi?id=9939

from libsolv.

mlschroe avatar mlschroe commented on June 6, 2024

Now done: the SOLVER_FLAG_STRONG_RECOMMENDS makes the solver create rules for recommends dependencies. Pretty much untested, though...

from libsolv.

adelcast avatar adelcast commented on June 6, 2024

While testing SOLVER_FLAG_STRONG_RECOMMENDS, I found a potential issue. In a repo that has the following (pseudo code form opkg ATS):

o.add(Package="x")
o.add(Package="a", Recommends="b")
o.add(Package="b", Recommends="c")
o.add(Package="c", Conflicts="x")

And package 'x' is installed, when an 'install a' operation is run, only 'a' is installed. Seems to me like a better solution would be to install 'a' AND 'b', which is what you get without SOLVER_FLAG_STRONG_RECOMMENDS. Would it make sense to have SOLVER_FLAG_STRONG_RECOMMENDS follow that behavior? I can open an issue, if you think this suggestion makes sense.

from libsolv.

adelcast avatar adelcast commented on June 6, 2024

@mlschroe

from libsolv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.