Skip to Content.
Sympa Menu

sm-users - Re: [SM-Users] menuconfig for casts

sm-users AT lists.ibiblio.org

Subject: Sourcemage Users List

List archive

Chronological Thread  
  • From: Andrew <afrayedknot AT thefrayedknot.armory.com>
  • To: sm-users AT lists.ibiblio.org
  • Subject: Re: [SM-Users] menuconfig for casts
  • Date: Fri, 16 Dec 2005 19:39:37 -0800

On Sat, Dec 17, 2005 at 01:12:34AM +0100, Thomas Orgis wrote:
> Am Fri, 16 Dec 2005 19:56:01 +0100
> schrieb Vladim?r Marek <vlmarek AT volny.cz>:
>
> > Well, the answers in [ ] are remembered since you allready answered
> > them. To force sorcery to re-ask you use cast -r (man cast)
>
> I already answered a lot of other questions, too, where the answer is
> remembered but is just placed as default in the still open prompt... (at
> least I have the impression). As I said: I don't know the rule behind that.
> If there is one.

There is a rule. If you answer the question and the spell file completes
the answers go to the persistent configuration file, if you recast the
spell without -r, then the answers are re-used without prompting. In
recent sorcerys the old answer is re-used. Note that those questions
use a specific api that is written that way, some spells use their own
hand-rolled api's that may act differently. There is an on-going effort
to convert all those hand-rolled queries to the new api. If the behavior
is not what you want and you know how to improve it (within the existing
framework, not in a new menu based one :-) ) file a bug, or check for
existing bugs that already suggest that.

>
> > > allowed for them to do, what is possible in reality? Can one guarantee
> > > a certain set of commands to be available to the scripts (sed, perl,
> > > ...) even on a very, very minimal system? How far does the turing
> > > completeness go in reality?
> >
> > Hmm. If you allow to run perl
>
> I meant that the script wants to use perl but there is no perl installed in
> this extremely minimal system - thus, the script is limited...

Spells cant assume anything other than basesystem and its dependencies
are installed in their environment. However, perl is a bad example since
its a dependency of glibc, which is a dependency of basesystem, so its
always there. But of course, bash is turing complete (without relying
on external programs, just in terms of its own control structures and
syntax/grammer), you can do whatever you want in a spell.

>
> > > It should be possible to restore the state the spell's CONFIGURE
> > > started in
> >
> > What makes you believe in that ?
>
> Well, supposed CONFIGURE does not write and change stuff in the system:
> Normally there is just a set of stored variables to delete... but that is
> what I think and it has already been shown that what I think is not
> necessarily what is the case in SMGL.
>
> > Well generally no ( you can create whatever you want in your local
> > grimoire, after all ). The only think I can think off is that the cast
> > is supposed to work even unattended, there are timeouts for each
> > question. I'm not sure how would you do that with menuconfig style ui.
>
> Simple: The default answers are there, too - of course. And: Ever seen a
> grub or lilo menu timing out and just doing boot of the default entry? I
> admit that I didn't work with dialog scripts yet; but even xmessage has
> this feature.
>
> And for the unattended argument:
>
> I'm preparing a workbox for a friend. Base install and rebuild done. He is
> _no_ Linux freak and needs to do some TeXing. So, I bluntly tried
>
> cast tetex kdebase
>
> and went through many, many questions. Then went away; in other words: let
> the cast continue unattended.
> Result: Quite some of the pulled-in dependency packages were installed, but
> 19 packages were dropped (among these tetex and kdelibs) and 9 encountered
> problems:
>
> jadetex failed because don't know: no compile log there
> gtk+ failed because X not there
> tk failed because of many compile errors ... somehow looks like assumed
> to have some X headers. Interesting that this doesn't fail when th header
> is not found but instead manages to produce many parsing errors with the
> non-defined stuff.
> qt-x11 because cups test failed (cups was selected but dropped)
> xdvi because no X (another circular one: X pulls jadetex for docu and this
> puts tetex in front of X on the row)
> arts because of no X (why the heck does a sound daemon need X?)
> lesstif of course because of no X
> aspell spreads some fear because of an internal compiler error
> (segmentation fault) in line 1016 of common/config.cpp
> pyrex failed - and that's a good one! - because python is not there (was on
> the install list)! Another circle closed.

You should file bugs for each of those. Although menuconfig wont make
it any better...

>
> Gazing at the activity I note that there were some failed summons, too
> (notably tetex and espgs). I'm trying to find out why...
>
> This brings me a bit down to the ground concerning more user-friendly
> configuration. It's a bit more important that sorcery does something
> against these circular dependencies! It may be extreme to try such a
> generic cast as I tried, but it should work, nonetheless.

It does do something for circular dependencies. However theres more it
can do, which is break the cycle at an optional dependency. Given the
complexity of the dependency processing engine already (we recently
integrated trigger processing to it (which are like dependencies but
they go the reverse direction), doing that has been postponed to a later
date to ensure that the trigger processing stablize (which even breaks
trigger loops and trigger/depends loops). Instead its suggested that
spells avoid them. The other answer is to use a 'suggests' api, which
doesnt imply an ordering like optional depends does but allows the user
to build stuff that might be useful. The canonical example is xorg +
espgs, I thought that issue had been taken care of already though,
perhaps it was forgotten.

>
> What about sorcery making a minimal build of such stuff as xorg, tetex or
> espgs first and the full build with options later to resolve the loops? The
> minimum should be that it at least detects the loop and warns me about it.
> Somehow this comes back to the point configuration being (turing-complete)
> programs and no parsed definitions - I suspect that circular dependencies
> can be produced without sorcery being able to know about them in the
> question-answer stage.
>
> Also, even without circular dependencies in the game, it is strange to be
> asked if I want to install package X three times if three packages in one
> cast optionally depend on it (but ok, it's only cosmetics since the
> question would remain and just be changed to "use X?"). But what if I say 2
> times "yes" and "no" the last time? Will X be cast?

Those questions mean do you want spell A to use spell B, yes the wording
is different if the spell is installed or not. I suppose it could say
some third thing if the spell is not installed, but is already going to
be installed. The first time you say yes, its going to be cast.

>
> Sorry for the ranty end, but I'm a bit annoyed by this at this late hour.
> It's especially discouraging because I find other aspects of SMGL so cool.
> To be fair, though, I'd have to try a `cast kdebase` without touching any
> options to see if the default choices avoid the circular dependencies.

I find it best to get some rest when its late and/or Im annoyed rather than
just ranting. Its a lot easier to get your point across with a level
head and after letting your mind think about things for a bit. I wish
I had known that advice sooner.


-Andrew

--
_________________________________________________________________________
| Andrew D. Stitt | acedit at armory.com | astitt at sourcemage.org |
| irc: afrayedknot | Sorcery Team Lead | ftp://t.armory.com/ |
| 1024D/D39B096C | 76E4 728A 04EE 62B2 A09A 96D7 4D9E 239B D39B 096C |
-------------------------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page