Skip to Content.
Sympa Menu

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

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Andrew Stitt <afrayedknot AT thefrayedknot.armory.com>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] proposed modification to build api
  • Date: Thu, 16 Nov 2006 10:50:52 -0800


Hi, I have a proposed change I'd like to make to the build api. First some
context.

With the stage-root feature of sorcery, spells install files to
the main system and are transparently placed instead in a side location
(the stage). Then sorcery installs the files to the system itself. Then
spells are given a final opportunity to do stuff (FINAL). We want to
provide a place in the build pipeline for spells to access the stage
prior to final installation. That provides some extra power to do lots
of nifty stuff.

The problem we're facing is where to add that functionality, and how to
do it in an intuitive way.

Currently the build process (in api2, assume I mean api2 for the rest of this
email) is

PRE_BUILD -> BUILD -> INSTALL -> POST_INSTALL -> FINAL

The first three are fairly well defined. POST_INSTALL is where
sorcery runs additional installation stuff (like initd, xinetd,
gather_docs, etc.). Im going to call this "installation extras". FINAL
is run after that.

Before stage-root (or with it disabled) INSTALL is tracked, and some
or all of POST_INSTALL is tracked.

With stage-root enabled we've been using POST_INSTALL as the place where
spells are allowed to modify the stage directly. That means that it can't
run inside the staging environment, and as a result all the installation
extras don't get automatically staged. It also presents some ambiguity
in the environment of POST_INSTALL, and thats probably not the best thing.

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.

For the new file that runs the installation extras, I suggest
"INSTALL_EXTRAS". The name makes it clear that its related to
installation, and that its extra stuff besides what INSTALL does.
It also provides a convenient, well defined, channel for the installation
extras category of stuff.

To do this backwards compatibly we need to remove all the POST_INSTALL
files we can. Looking through the main and z-rejected grimoires theres
no use of POST_INSTALL I found that needs to be there. Most of them are
messages which could be in FINAL, or some extra file installation that
could just as well be done in INSTALL. David Kowis has volunteered to
make the change. The games grimoire uses POST_INSTALL quite a bit,
so that will need further investigation, but I dont think its an
unsolvable problem. Any objections to this proposed change?

-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 |
-------------------------------------------------------------------------

Attachment: pgpneahxUz7ta.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page