[Pkg-zsh-devel] Bug#909114: Bug#909114: Bug#909114: Bug#909114: Check for missing pcre module

Daniel Shahaf danielsh at apache.org
Tue Sep 18 19:17:54 BST 2018


Daniel Shahaf wrote on Tue, Sep 18, 2018 at 17:34:28 +0000:
> Therefore the revised plan is:
> 
> A. Teach upstream configure to fail hard if --with-pcre was passed and
>    pcre wasn't found.  PCRE would remain optional if neither --with-pcre
>    nor --without-pcre was passed.
> 
> B. Pass --with-pcre to configure in d/rules.
> 

For clarity, there's already a --enable-pcre flag, and d/rules does pass it,
but configure does not fail hard when --enable-pcre is passed and libpcre
wasn't found.  Such "fail hard" functionality should be added to configure and
d/rules should use it.

> C. Teach upstream test V07 to make the skip conditional, not on whether
>    pcre loads successfully, but on whether it was found by configure.
>    (This probably means looking in config.modules or in pcre.mdd or
>    something?)  This will catch bugs where pcre was built but fails to load.

I came up with this, but when I applied it to 5.6.2-2 the build didn't fail as
I expected it to.  Does anyone see the problem?

[[[
diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst
index 9feeb47fb..ab67f3d80 100644
--- a/Test/V07pcre.ztst
+++ b/Test/V07pcre.ztst
@@ -1,11 +1,10 @@
 %prep
 
-  if ! zmodload -F zsh/pcre C:pcre-match 2>/dev/null
+  if grep '^name=zsh/pcre .* link=no ' $ZTST_testdir/../config.modules >/dev/null
   then
-    ZTST_unimplemented="the zsh/pcre module is not available"
+    ZTST_unimplemented="the zsh/pcre module was disabled by configure (see config.modules)"
     return 0
   fi
-# Load the rest of the builtins
   zmodload zsh/pcre
   setopt rematch_pcre
 # Find a UTF-8 locale.
]]]

Cheers,

Daniel



More information about the Pkg-zsh-devel mailing list