mirror of
https://github.com/mudler/luet.git
synced 2025-07-03 10:36:15 +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
|
||||
if !full && checkconflicts {
|
||||
for _, candidate := range toRemove {
|
||||
if conflicts, _ := s.ConflictsWith(candidate, s.Installed()); conflicts {
|
||||
revdeps, _ := s.InstalledDatabase.GetRevdeps(candidate)
|
||||
packs := ""
|
||||
for _, p := range revdeps {
|
||||
packs += " " + p.HumanReadableString()
|
||||
}
|
||||
return nil, errors.New("Package " + candidate.HumanReadableString() + "has conflicts: required by " + packs)
|
||||
if conflicts, err := s.Conflicts(candidate, s.Installed()); conflicts {
|
||||
return nil, errors.Wrap(err, "while searching for "+candidate.HumanReadableString()+" conflicts")
|
||||
}
|
||||
}
|
||||
return toRemove, nil
|
||||
|
Loading…
Reference in New Issue
Block a user