[Libosinfo] [osinfo-db PATCH 1/2] install-script, fedora: Only add install-source if there's an install URL
Fabiano Fidêncio
fidencio at redhat.com
Thu Jul 11 08:34:57 UTC 2019
When dealing with net-install ISOs, we may reach the situation where
the command-line template will generate the command-line adding a
"inst.repo=" but the installation URL is not present.
The easiest way to deal with this is checking whether an installation
URL is present and only adding "inst.repo=" if that's the case.
https://gitlab.com/libosinfo/osinfo-db/issues/29
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
.../fedoraproject.org/fedora-kickstart-desktop.xml.in | 7 +++++--
.../fedoraproject.org/fedora-kickstart-jeos.xml.in | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
index 33f674c..7a16a42 100644
--- a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
+++ b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
@@ -118,7 +118,10 @@
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="script/expected-filename"/>
- <xsl:if test="script/installation-source = 'network'">
+ <xsl:variable name="installation-url">
+ <xsl:call-template name="installation-url"/>
+ </xsl:variable>
+ <xsl:if test="script/installation-source = 'network' and $installation-url != ''">
<xsl:choose>
<xsl:when test="os/version < 19">
<xsl:text> method=</xsl:text>
@@ -127,7 +130,7 @@
<xsl:text> inst.repo=</xsl:text>
</xsl:otherwise>
</xsl:choose>
- <xsl:call-template name="installation-url"/>
+ <xsl:value-of select="$installation-url"/>
</xsl:if>
</xsl:template>
diff --git a/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in b/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
index 68ece05..8cc8778 100644
--- a/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
+++ b/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
@@ -113,7 +113,10 @@
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="script/expected-filename"/>
- <xsl:if test="script/installation-source = 'network'">
+ <xsl:variable name="installation-url">
+ <xsl:call-template name="installation-url"/>
+ </xsl:variable>
+ <xsl:if test="script/installation-source = 'network' and $installation-url != ''">
<xsl:choose>
<xsl:when test="os/version < 19">
<xsl:text> method=</xsl:text>
@@ -122,7 +125,7 @@
<xsl:text> inst.repo=</xsl:text>
</xsl:otherwise>
</xsl:choose>
- <xsl:call-template name="installation-url"/>
+ <xsl:value-of select="$installation-url"/>
</xsl:if>
</xsl:template>
--
2.21.0
More information about the Libosinfo
mailing list