Comments (7)
libsolv has a mechanism for dropping conflicting packages with SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL, but it relies on the 3rd party repos not being enabled, i.e. the 3rd party packages must be "orphaned".
It seems that you want some method to tell the solver "you're free to drop those installed packages if they get in the way", i.e. like allowuninstall (aka allowerasing) but just for a specific set of packages.
from libsolv.
From a high-level perspective, I think we would like to cover three basic cases during N -> N+1 system upgrades:
- third-party repos exist for N+1 and contain package updates with non-problematic dependencies: In this case we want to upgrade those packages together with the rest of the system.
- third-party repos don't exist for N+1 and the current packages have problematic dependencies, meaning they prevent current packages from upgrading. Alternatively the N+1 repos do exist, but the package updates still have problematic dependencies: In this case we want to prioritize packages from our official repositories at the expense of third-party repositories (removing their packages if needed).
- third-party repos don't exist for N+1 (or the packages were not installed from any repository at all), but they don't cause any problematic dependencies while the rest of the system upgrades to N+1. In that case we want to keep those packages installed and don't remove them.
I'm not sure how much of it is related to libsolv and what is a higher-level problem, so please forgive me if I'm completely off-topic here.
from libsolv.
libsolv has a mechanism for dropping conflicting packages with SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL, but it relies on the 3rd party repos not being enabled, i.e. the 3rd party packages must be "orphaned".
We would like to keep them if possible.
It seems that you want some method to tell the solver "you're free to drop those installed packages if they get in the way", i.e. like allowuninstall (aka allowerasing) but just for a specific set of packages.
Yes, that would resolve 1), 2), 3) specifications. The new Repo int attribute or Pool map attribute would be sufficient. Thanks.
from libsolv.
I added the SOLVER_ALLOWUNINSTALL job type, please check if it meets your requirements.
from libsolv.
I am struggling with understanding the semantic of SOLVER_ALLOWUNINSTALL
.
If pkg D
is not allowed to be uninstalled then it will fail. Fine.
repo system 0 testtags <inline>
#>=Pkg: A 1 1 x86_64
#>=Pkg: B 1 1 x86_64
#>=Pkg: C 1 1 x86_64
#>=Pkg: D 1 1 x86_64
repo fedora 0 testtags <inline>
#>=Pkg: A 1 2 x86_64
#>=Pkg: B 1 2 x86_64
#>=Con: D
system x86_64 rpm system
solverflags keeporphans
job distupgrade all packages
result transaction,problems <inline>
#>erase D-1-1.x86_64@system
#>problem bbe6eb7e info package B-1-2.x86_64 conflicts with D provided by D-1-1.x86_64
#>problem bbe6eb7e solution 20a5cb70 erase D-1-1.x86_64@system
#>problem bbe6eb7e solution 81759705 allow B-1-1.x86_64@system
I allow him to be erased. Works as expected.
repo system 0 testtags <inline>
#>=Pkg: A 1 1 x86_64
#>=Pkg: B 1 1 x86_64
#>=Pkg: C 1 1 x86_64
#>=Pkg: D 1 1 x86_64
repo fedora 0 testtags <inline>
#>=Pkg: A 1 2 x86_64
#>=Pkg: B 1 2 x86_64
#>=Con: D
system x86_64 rpm system
solverflags keeporphans
job allowuninstall pkg D-1-1
job distupgrade all packages
result transaction,problems <inline>
#>erase D-1-1.x86_64@system
#>upgrade A-1-1.x86_64@system A-1-2.x86_64@fedora
#>upgrade B-1-1.x86_64@system B-1-2.x86_64@fedora
But when I add pkg B
to allow_uninstall set, the B will not get upgraded anymore. I expect it to work like in the previous example.
repo system 0 testtags <inline>
#>=Pkg: A 1 1 x86_64
#>=Pkg: B 1 1 x86_64
#>=Pkg: C 1 1 x86_64
#>=Pkg: D 1 1 x86_64
repo fedora 0 testtags <inline>
#>=Pkg: A 1 2 x86_64
#>=Pkg: B 1 2 x86_64
#>=Con: D
system x86_64 rpm system
solverflags keeporphans
job allowuninstall pkg B-1-1
job allowuninstall pkg D-1-1
job distupgrade all packages
result transaction,problems <inline>
#>upgrade A-1-1.x86_64@system A-1-2.x86_64@fedora
From docs: Allow the solver to deinstall the matching installed packages if they get into the way of resolving a dependency. This is like the SOLVER_FLAG_ALLOW_UNINSTALL flag, but limited to a specific set of packages.
why at some point SOLVER_FLAG_ALLOW_UNINSTALL
flag protects packages rather than letting them to be erased?
from libsolv.
I think this is already fixed with the latest commits. (Especially 80ddee1)
from libsolv.
Confirming that it works now, thanks.
from libsolv.
Related Issues (20)
- Obsoletes is not honored while solving HOT 4
- Using old version to satisfy dependency HOT 3
- Unable to find size of unsigned char string returned by solvable_lookup_bin_checksum HOT 2
- solvable_lookup_bin_checksum() returning only sha256 HOT 1
- Using `focusbest` with `ignorerecommended` installs recommend anyway HOT 1
- Setting a limit on concurrently installed installonly packages HOT 3
- What about release of 0.7.25 HOT 3
- segfault from libsolv during dependency checking for reposync from source with large metadata file. HOT 6
- RFE: is it possible to start making github releases?🤔 HOT 5
- solv.so Ruby binding should depend on libruby HOT 1
- Prefer latest versions of newly pulled in dependencies over smaller transaction
- Non consistent behavior of installonly packages HOT 2
- dumpsolv -j hangs when executed in container with allocated tty HOT 1
- Extend unneeded packages by weak dependencies HOT 4
- lua bindings? HOT 6
- testsolv json output
- libzypp and code using it can't be built with a C++20 compiler HOT 1
- testsolv -W hangs for some packages HOT 2
- Add support for parsing `repodata.json` file with `repodata_version` 2 HOT 1
- Python binding for repodata.add_solv returns False when should return True HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsolv.