[jhalfs] 04/12: [compound pkg] Simplify test for the right matched tarball

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Wed, 22 Jan 2025 11:27:19 +0000
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository jhalfs.

commit 011fc0eb27321537a8b589e619b386206d385682
Author: Pierre Labastie <[email protected]>
AuthorDate: Tue Jan 14 16:21:20 2025 +0100

    [compound pkg] Simplify test for the right matched tarball
    
    Now the test is done while matching the tarball, so no need to do
    it, but there are cases where the tarball matching may return an
    empty result, so just test that.
---
 BLFS/xsl/make_book.xsl | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/BLFS/xsl/make_book.xsl b/BLFS/xsl/make_book.xsl
index 7c780dd..26e7559 100644
--- a/BLFS/xsl/make_book.xsl
+++ b/BLFS/xsl/make_book.xsl
@@ -520,16 +520,12 @@
                         select="string(.//userinput[starts-with(string(),'cat ')])"/>
       </xsl:call-template>
     </xsl:variable>
-    <!-- Unfortunately, there are packages in kf6 and plasma that
-         starts in the same way: for example kwallet in kf6
-         and kwallet-pam in plasma. So we may arrive here with
-         package=kwallet and tarball=kwallet-pam-(version).tar.xz.
-         We should not continue in this case. For checking, transform
-         digits into X, and check that package-X occurs in tarball. We
-         have to translate package too, since it may contain digits.-->
-    <xsl:if test=
-        "contains(translate($tarball,'0123456789','XXXXXXXXXX'),
-                  concat(translate($package,'0123456789','XXXXXXXXXX'),'-X'))">
+    <!-- If there is no match for $package-<digit> in cat-md5, the
+         tarball variable is empty. This may happen if there is a package
+         "pkg" in one sect1 and "pkg-something" in another sect1, and the
+         current element is the second sect1 while we want to match just
+         "pkg". So only run the sequel if $tarball is not empty.-->
+    <xsl:if test="$tarball!=''">
       <xsl:variable name="md5sum">
         <xsl:call-template name="md5sum">
           <xsl:with-param name="package" select="concat(' ',$package,'-')"/>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page