mirror of
https://github.com/mudler/luet.git
synced 2025-07-04 19:16:50 +00:00
Use Conflicts() which already lists revdeps on failure
This commit is contained in:
parent
0652fce55e
commit
dce8b52293
@ -589,13 +589,8 @@ func (s *Solver) Uninstall(checkconflicts, full bool, packs ...pkg.Package) (pkg
|
|||||||
// be removed). Let's only check if we can remove the selected package
|
// be removed). Let's only check if we can remove the selected package
|
||||||
if !full && checkconflicts {
|
if !full && checkconflicts {
|
||||||
for _, candidate := range toRemove {
|
for _, candidate := range toRemove {
|
||||||
if conflicts, _ := s.ConflictsWith(candidate, s.Installed()); conflicts {
|
if conflicts, err := s.Conflicts(candidate, s.Installed()); conflicts {
|
||||||
revdeps, _ := s.InstalledDatabase.GetRevdeps(candidate)
|
return nil, errors.Wrap(err, "while searching for "+candidate.HumanReadableString()+" conflicts")
|
||||||
packs := ""
|
|
||||||
for _, p := range revdeps {
|
|
||||||
packs += " " + p.HumanReadableString()
|
|
||||||
}
|
|
||||||
return nil, errors.New("Package " + candidate.HumanReadableString() + "has conflicts: required by " + packs)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return toRemove, nil
|
return toRemove, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user