Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] multiple depends from one option (was: meta spells)

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Jeremy Blosser <jblosser-smgl AT firinn.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] multiple depends from one option (was: meta spells)
  • Date: Thu, 8 Mar 2007 18:53:53 -0600

On Dec 21, Eric Sandall [eric AT sandall.us] wrote:
> Quoting Andrew Stitt <afrayedknot AT thefrayedknot.armory.com>:
> <snip>
> > So, first lets quantify the problem. What spells/spell groups need this
> > functionality? For sub-depends what I did was create a feature bug for
> > it, and have spell bugs with sub-depends as the resolution depend on
> > it. Then I looked for the common thread between them. Start with real
> > examples and lets objectively analyize them.
>
> An example of a spell that has multiple dependencies based on a query
> is kdesdk.
>
> # gaze CONFIGURE kdesdk
> source $SECTION_DIRECTORY/KDE_CONFIGURE &&
>
> if provider_ok APU &&
> spell_ok subversion; then
> config_query KDESDK_SUBVERSION 'Build Subversion SCM support?' y
> else
> config_query KDESDK_SUBVERSION 'Build Subversion SCM support?' n
> fi
>
> # gaze DEPENDS kdesdk
> depends kdebase &&
> depends perl &&
>
> source $SECTION_DIRECTORY/KDE_DEPENDS &&
> <snip>...
> if [ "$KDESDK_SUBVERSION" == "y" ]; then
> depends APU &&
> depends subversion
> fi
>
> I found this as I did `dispel --user-deps apr-util0` and it wanted to
> dispel kdesdk since APU is a hard-dependency, rather than recast
> kdesdk without subversion support.

I'm running into this again trying to shepherd through some EVMS changes
(bug 13606). It can build a text-mode GUI that requires both ncurses and
glib, and a GTK one that requires glib as well. Originally he had them
both as optional_depends with the same query text, which I advised against
because if they pick one and not the other (or have one but not the other
and ignore the prompts) they won't get what they want. He changed it to a
config_query that pulls in the two dependencies, but made the config_query
default to "y" because that's the way upstream would default assuming those
things are installed. Of course if they aren't installed they get pulled
in, which is no good.

So basically I'm left telling him to do what you did above, which is to use
spell_ok to see if those dependencies are available, and default his answer
to the config_query accordingly, then take his depends from that answer.
And it's still left with sorcery having no way to tell that was an optional
dependency at dispel time.

Did anyone ever file a master bug for this so we can file per-spell bugs
and tie them to it, as suggested above?

Attachment: pgpomRQtbEBtv.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page