On Mon, 9 Aug 2010 07:17:34 +1000 (EST), "Timothy Rice"
<t.r...@ms.unimelb.edu.au> wrote:
> Hi Bryan,
>
>> How do you propose, during package X's installation, to find which other
>> packages it depends on? It seems like that's a much bigger issue than
>> how to encode the dependencies.
>
> You are correct. At this stage, I am manually putting the list of
> dependencies into a text file.
>
> The process of dependency-determination can (and will) eventually be
> automated, by having a script or program that scans the book's source code
> for dependencies.
The attached XSLT should do what you need, although it probably doesn't match
the format
you would like. Just run it as:
xsltproc --xinclude /path/to/blfs-checkout/index.xml dependencies.xml
Regards,
Matt.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates select="book/part/chapter/sect1/sec...@role='package']"/>
</xsl:template>
<xsl:template match="book/part/chapter/sect1/sec...@role='package']">
<xsl:text>p: </xsl:text>
<xsl:value-of select="../@id"/>
<xsl:text>
</xsl:text>
<xsl:apply-templates select="pa...@role]/xref"/>
</xsl:template>
<xsl:template match="pa...@role]/xref">
<xsl:choose>
<xsl:when test="../@role = 'required'">
<xsl:text>m: </xsl:text>
</xsl:when>
<xsl:when test="../@role = 'recommended'">
<xsl:text>r: </xsl:text>
</xsl:when>
<xsl:when test="../@role = 'optional'">
<xsl:text>o: </xsl:text>
</xsl:when>
</xsl:choose>
<xsl:value-of select="@linkend"/>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page