sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: flux <flux AT sourcemage.org>
- To: SM-Discuss <sm-discuss AT lists.ibiblio.org>
- Subject: [SM-Discuss] Spell QA in the grimoire
- Date: Thu, 15 Oct 2009 20:08:14 -0400
Of late, there has been a rash of complaints regarding spells breaking.
From personal observance (which is rather low and insignificant since
I'm certainly not a heavy caster or tester of what's happening in the
grimoire repo, due to time issues), it seems that a good amount of the
breaks are due to either missing dependencies or dependency version
mismatches.
I hereby propose the following (possible) solution to this problem. For
every binary installed by a spell (i.e., everything other than libraries
and data/configs), run readelf -d on the binary and parse the output for
the needed libraries. The needed libraries will be shown both as the
library itself, and also as the version. It will then be up to the
developer to determine if the particular version to which the binary is
linked on his/her system is actually required or if the spell can be run
with a different version.
This process could be automated, even to the point of automatically
adding the dependencies to DEPENDS for the developer (quill?). It will
take some work to get it right for the type of dependency (absolutely
required, optional, etc.) and other complicated scenarios, but I think
having a default of just hard depending on the library in question for
the interim is a good idea. Replacing a depends with an optional_depends
(or similar) is much easier to fix than having the dependency missing
entirely, since anyone who casts the spell and sees it pulling in things
they don't want will be suspicious and can then investigate whether
those dependencies should be made optional. Over time, the method can be
improved to more properly handle automating the dependency adding so
that it is correctly added as a hard or optional dependency in the first
place. IMHO, the important point is to get started and worry about
making it perfect later.
As a final note, my reason for choosing readelf -d rather than ldd is
taht readelf -d tends to be more accurate and, IMHO, better suited for
machine reading the output. Both are provided by core spells (binutils
for readelf, and glibc for ldd), so they should both be guaranteed to be
present on any developer's machine.
Comments/suggestions/etc. please.
--
Justin "flux_control" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux
http://www.sourcemage.org
Attachment:
pgpI4xPve0Vk1.pgp
Description: PGP signature
- [SM-Discuss] Spell QA in the grimoire, flux, 10/15/2009
Archive powered by MHonArc 2.6.24.