aboutsummaryrefslogtreecommitdiffstats
path: root/BLFS/gen-special.sh
diff options
context:
space:
mode:
authorPierre Labastie <pierre@linuxfromscratch.org>2015-11-17 20:18:23 +0000
committerPierre Labastie <pierre@linuxfromscratch.org>2015-11-17 20:18:23 +0000
commit5fb012da9a5b2cff3e22d12fa18a3b4d49690379 (patch)
tree823d88c5266e40cb655105d78a51bada0cccee41 /BLFS/gen-special.sh
parentd7c07e0b340fd4f5c1c693ca7c6e39366d8d70f0 (diff)
Add non-versioned packages in packages.xml. This allows for example to list dependencies of CA certificates
Diffstat (limited to 'BLFS/gen-special.sh')
-rwxr-xr-xBLFS/gen-special.sh39
1 files changed, 38 insertions, 1 deletions
diff --git a/BLFS/gen-special.sh b/BLFS/gen-special.sh
index 09ed6087d7..828a2b6215 100755
--- a/BLFS/gen-special.sh
+++ b/BLFS/gen-special.sh
@@ -11,7 +11,10 @@
# - If a package is part of a group of xorg packages (proto, fonts, etc)
# there is no easy way to extract it from the xml. We use the ENTITY at
# the top of each file x7*.xml
-# - If a pacakge is versioned but the version is not mentioned in the book
+# - Some non-versioned packages are needed as dependencies of others: we
+# attribute version 1.0.0 to them. It is just used to know if the package
+# is installed, by checking inst-version.
+# - If a package is versioned but the version is not mentioned in the book
# (currently only udev), we retrieve the version by other means
#-------------------------------------------------------------------------
# Arguments:
@@ -34,6 +37,10 @@ if test -z "${BLFS_DIR}"; then BLFS_DIR=$(cd $(dirname ${BLFS_XML})/.. ; pwd);fi
EXCEPTIONS=$(grep 'ENTITY.*version[ ]*"[^0-9"&.].*[0-9]' $BLFS_XML |
sed 's@^[^"]*"\([^"]*\)".*@\1@')
+# Non-versioned packages:
+NV_LIST="cacerts xorg-env kde-pre-install-config kf5-intro lxqt-pre-install \
+ojdk-conf tex-path"
+
# Set PATH to be sure to find udevadm
SAVPATH=$PATH
PATH=/bin:/sbin:/usr/bin:/usr/sbin
@@ -75,6 +82,36 @@ cat >$SPECIAL_FILE << EOF
<xsl:when test="@id='xorg7'"/>
EOF
+# Non-versionned packages. Add to NV_LIST if you need more.
+for nv_id in $NV_LIST; do
+ cat >>$SPECIAL_FILE << EOF
+ <xsl:when test="@id='$nv_id'">
+ <xsl:text> </xsl:text>
+ <package><xsl:text>&#xA; </xsl:text>
+ <xsl:element name="name">$nv_id</xsl:element>
+ <xsl:text>&#xA; </xsl:text>
+ <xsl:element name="version">1.0.0</xsl:element>
+ <xsl:if
+ test="document(\$installed-packages)//package[name=current()/@id]">
+ <xsl:text>&#xA; </xsl:text>
+ <xsl:element name="inst-version">
+ <xsl:value-of
+ select="document(\$installed-packages
+ )//package[name=current()/@id]/version"/>
+ </xsl:element>
+ </xsl:if>
+<!-- Dependencies -->
+ <xsl:apply-templates select=".//para[@role='required' or
+ @role='recommended' or
+ @role='optional']"
+ mode="dependency"/>
+<!-- End dependencies -->
+ <xsl:text>&#xA; </xsl:text>
+ </package><xsl:text>&#xA;</xsl:text>
+ </xsl:when>
+EOF
+done
+
# Taking packages inside x7proto etc, as versionned modules.
# We also write a dependency expansion when a dep is of the form
# xorg7-something. Since that is another template, we need