sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
Re: [SM-Discuss] multiple depends from one option (was: meta spells)
- From: Juuso Alasuutari <iuso AT sourcemage.org>
- To: sm-discuss AT lists.ibiblio.org
- Subject: Re: [SM-Discuss] multiple depends from one option (was: meta spells)
- Date: Fri, 9 Mar 2007 14:34:55 +0200
On Friday 09 March 2007 02:53, Jeremy Blosser wrote:
> 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?
I'm sorry, filing that bug was something I promised but neglected to do. Here
it is, finally: http://bugs.sourcemage.org/show_bug.cgi?id=13609
--
Juuso Alasuutari
[[ Source Mage GNU/Linux ]]
Attachment:
pgps8pHRDe_MR.pgp
Description: PGP signature
-
Re: [SM-Discuss] multiple depends from one option (was: meta spells),
Jeremy Blosser, 03/08/2007
- Re: [SM-Discuss] multiple depends from one option (was: meta spells), Juuso Alasuutari, 03/09/2007
Archive powered by MHonArc 2.6.24.