[pacman-dev] [PATCH] Initial draft of package cycle removal

Ashley Whetter ashley at awhetter.co.uk
Wed May 18 18:54:34 UTC 2016

On Wed, 18 May 2016 15:14:08 +1000, Allan McRae <allan at archlinux.org> wrote:

> On 09/05/16 01:08, Ashley Whetter wrote:
> > ---
> >  lib/libalpm/deps.c                           | 224 ++++++++++++++++++++++++---
> >  test/pacman/tests/TESTS                      |   1 +
> >  test/pacman/tests/remove-dependency-cycle.py |  25 +++
> >  3 files changed, 231 insertions(+), 19 deletions(-)
> >  create mode 100644 test/pacman/tests/remove-dependency-cycle.py
> > 
> Have you been given any comments on this yet?  I have not looked in the
> patch itself as from memory you were discussing this with Andrew.  Is
> that right?
I've not had any comments as of yet. I did have a brief discussion with Andrew very early on about his suggestion on the flyspray issue. The outcome was that it was too difficult to filter the list of all dependencies, which I started looking towards graph methods instead.

> Ihe inclusion of a test case is great.  Even better that it passes!
> Did you check it did not pass before applying your patch too?
I did check. Took me some time to get it to not fail ;)
I need to add a few more test cases before I submit the final version. For example for when two packages are being removed that have the same dependency cycle, when an explicitly installed package exists in a cycle, and when a removal target exists in a cycle.

> Please test your build using "--enable-git-version --enable-debug
> --enable-warningflags"
> deps.c:597:5: error: no previous prototype for ‘_alpm_find_cycles’
> [-Werror=missing-prototypes]
>  int _alpm_find_cycles(alpm_graph_t *v, alpm_list_t **path)
>      ^~~~~~~~~~~~~~~~~
> deps.c:672:6: error: no previous prototype for ‘_alpm_graph_unvisit_all’
> [-Werror=missing-prototypes]
>  void _alpm_graph_unvisit_all(alpm_graph_t *v)
>       ^~~~~~~~~~~~~~~~~~~~~~~
> deps.c:698:5: error: no previous prototype for ‘_can_remove_cycle’
> [-Werror=missing-prototypes]
>  int _can_remove_cycle(alpm_db_t *db, alpm_pkg_t *cycle_pkg, alpm_list_t
> *targs,
>      ^~~~~~~~~~~~~~~~~
> deps.c:734:5: error: no previous prototype for ‘_alpm_find_removables’
> [-Werror=missing-prototypes]
>  int _alpm_find_removables(alpm_db_t *db, alpm_graph_t *v, alpm_list_t
> **targs, int include_explicit)
>      ^~~~~~~~~~~~~~~~~~~~~
I will do this for the final version. I may (separately) add this suggestion to HACKING as well.


More information about the pacman-dev mailing list