handling circular dependencies

Duncan Gibson duncan.gibson at xs4all.nl
Sun Jan 16 09:33:45 CET 2011


> revising the configuration of 'cairo' and much around it (take a look at
> the module submission queue) I discovered some circular dependencies
> ('libspectre', 'poppler' and 'librsvg' should actually be optional
> dependencies for 'cairo') and how troublesome and annoying they can be ...
> for now I handled them with POST_INSTALL and POST_REMOVE, which, of
> course, isn't the most elegant way to do this ...

so far I have only noticed circular depends problems in "lvu stree".
It may just need a change in the logic, but maybe it's not so easy to
achieve in bash.

The alternative is to leave out one of the depends, or better still,
to comment it out with a reason why, and then add an explicit 'lin'.
There are lots of examples within moonbase that use 'module_installed'
but maybe some of them could/should be rewritten.

The problem is that there doesn't appear to be a definitive guide on
how to handle this sort of problem anywhere.

I append two random examples of 'module_installed' use.

Cheers
Duncan / engelsman

video/xvidcore/POST_INSTALL:
  if module_installed MPlayer;   then lin -c MPlayer;   fi

x11/xplanet/BUILD:
  if module_installed xscreensaver; then
    OPTS="$OPTS --with-xscreensaver"
  fi                                       &&




More information about the Lunar-dev mailing list