Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] proposed modification to build api

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] proposed modification to build api
  • Date: Thu, 16 Nov 2006 13:07:34 -0600

On Nov 16, Andrew Stitt [afrayedknot AT thefrayedknot.armory.com] wrote:
> I propose that we move the installation extras (the pre-stage-root
> POST_INSTALL) to a new file that runs between INSTALL and
> POST_INSTALL. Then change the definition of POST_INSTALL such that
> it is where a spell can have direct access to the stage prior to its
> installation. I can go one step further and suggest that the default
> POST_INSTALL is sorcery's staged installation code. So, a spell
> could override that if it wanted to. If stage-root was disabled then
> either POST_INSTALL wouldn't get run, or the default would be a no-op.

Making the meaning of POST_INSTALL for spellwriters be "things to do
*prior* to installation" seems counterintuitive. I know we are dealing
with two meanings of "install" (one for the install into the stage, one for
the install to the live system), but just read that sentence above
"POST_INSTALL ... is where a spell ... prior to its installation" and
hopefully it's clear that may be confusing for people.

I'll also note that if we made POST_INSTALL default to the staged
installation code then for people to get the benefit of being able to
modify the stage before the staged installation they'd need to do:

====================
some code1 &&
some code2 &&
some code3 &&

default_post_install
====================

which is backwards from how all the other default_ stuff usually works,
isn't it?

I know this is pedantry, just trying to avoid future scenarios of people
writing broken spells, I know how fond you are of those. :-)

The first issue could be resolved changing the name of the file to
STAGED_INSTALL instead of POST_INSTALL. This would make it clear(er) what
this step does, assuming you apply the default as you suggested. It
doesn't resolve the second issue, but maybe with that name it's more
obvious to people that anything they want to do ahead of the STAGED_INSTALL
can go in that file ahead of the default call. The other way to fix the
second issue is probably yet another spell file and I imagine we want to
avoid that.

Or maybe we do:

... -> INSTALL -> INSTALL_EXTRAS -> POST_INSTALL -> STAGED_INSTALL -> FINAL

since POST_INSTALL does exist already. This would let people make their
changes in POST_INSTALL and they'd have the option to override the staged
install but obviously usually wouldn't need to know that was even there.

I don't know how you feel about doing this to the spell namespace and I'm
not invested in that or anything, just making a suggestion.

Attachment: pgpOGY98YOoc4.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page