[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool --update fails w/ conditional-dependencies
From: |
Bruno Haible |
Subject: |
Re: gnulib-tool --update fails w/ conditional-dependencies |
Date: |
Tue, 24 Jul 2012 23:38:56 +0200 |
User-agent: |
KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; ) |
Hi,
Nick Bowler wrote:
> Commit b283b5d518e1 ("gnulib-tool: Refactor inctests variable.")
> broke gnulib-tool's update mode for me. I am using the
> conditional-dependencies feature. Attempting to run
> gnulib-tool --update on one of my projects prints the following
> message:
>
> gnulib-tool: option --conditional-dependencies is not supported with
> --with-tests
>
> which is surprising as I am not using --with-tests. The behaviour is
> identical even if I explicitly pass --without-tests.
>
> Closer inspection reveals that on line 4448 of gnulib-tool we have the
> following shell condition:
>
> if test "$cond_dependencies" = true && $inctests; then
> [ ... prints the error message and bails ...]
> fi
>
> and when my shell executes this condition, inctests is set to the empty
> string and the condition passes.
>
> I can reproduce easily as follows:
>
> $GNULIB/gnulib-tool --import --conditional-dependencies
> $GNULIB/gnulib-tool --update
>
> Reverting the aforementioned commit resolves the issue.
Thanks for the report and detailed analysis!
> inctests is set to the empty string and the condition passes.
Here's the problem: inctests should not be empty at this point. I'm
applying the attached fix (untested - please report again if it still
does not work).
2012-07-24 Bruno Haible <address@hidden>
gnulib-tool: Fix handling of inctests variable.
* gnulib-tool: Canonicalize $inctests also in 'update' mode.
Reported by Nick Bowler <address@hidden>.
--- gnulib-tool.orig Tue Jul 24 23:35:39 2012
+++ gnulib-tool Tue Jul 24 23:33:33 2012
@@ -1349,7 +1349,7 @@
fi
# Canonicalize the inctests variable.
case "$mode" in
- import | add-import | remove-import)
+ import | add-import | remove-import | update)
if test -z "$inctests"; then
inctests=false
fi