rmarquis / pacaur

[unmaintained] An AUR helper that minimizes user interaction
https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144
ISC License
796 stars 114 forks source link

Bogus cyclical dependency / print cyclical dependencies #634

Closed du5tball closed 7 years ago

du5tball commented 7 years ago

Version: pacaur 4.6.10

Description

Today I tried to upgrade my system. The stuff that is handled by pacman worked fine, but when it came to the AUR, pacaur simply said "dependency cycle detected". This is issue one: It says that there is a cyclical dependency, but it doesn't say what. I hereby request to have the cycle printed.

After a bit of tinkering I discovered the dependency is caused by pypy3-pip and pypy3-setuptools (or one of it's dependencies). However, cower -dd pypy3-setuptools pypy3-pip; grep -riE "(pypy-pip|pypy3-pip)" ./ does not show anything depending on pypy3-pip.

Debug output

bash -x pacaur -Syu pypy3-pip: https://ptpb.pw/GBsY

rmarquis commented 7 years ago

Cyclical dependencies are now printed in 42d32ad6589ad661c3fa1c43a2c65909d5afc013. Dependencies are solved by "depth level" and this error is raised only when two consecutive levels are strictly identical. In other words, it doesn't tell which dependencies are problematic but only shows all dependencies that are being solved when the issue arises.

I am not sure this check is still required, as the current development version uses topological sorting (see #408) instead of a brute force method. It is kept as a failsafe to avoid an infinite loop.

The topological sorter is somewhat more verbose and displays the following:

pacaur -S pypy3-pip
:: Package pypy3-pip not found in repositories, trying AUR...
:: resolving dependencies...
tsort: -: input contains a loop:
tsort: pypy-appdirs
tsort: pypy3-setuptools
tsort: pypy3-appdirs
tsort: pypy-setuptools
tsort: -: input contains a loop:
tsort: pypy-packaging
tsort: pypy3-setuptools
tsort: pypy3-appdirs
tsort: pypy-setuptools
tsort: -: input contains a loop:
tsort: pypy-pyparsing
tsort: pypy3-setuptools
tsort: pypy3-packaging
tsort: -: input contains a loop:
tsort: pypy3-setuptools
tsort: pypy3-appdirs
tsort: -: input contains a loop:
tsort: pypy3-packaging
tsort: pypy3-setuptools

There are multiple cyclical dependency issues here, but they are related to pypy3-setuptools and pypy-setuptools, not pypy3-pip. The dependencies of these packages indeed require them and the solver has no idea what to do here.

The dependency cycle check works as intended. You might want to check with the respective maintainers what's going on, as I'm not even sure what a human should do in that specific situation.

A tsort error check has been added in 4eca5ef31dafecdb1341ff01e61f585e037fb8b5, to avoid the installation to continue and fails.