() Bruno Haible <br...@clisp.org> () Fri, 2 Apr 2010 10:32:18 +0100 I apologize for the delayed response.
If you just cut randomly, you will introduce bugs in your package, for sure. There are two reasonable uses of '--avoid': 1) When the documentation of the modules mentions that a module fixes bugs on particular platforms, and you know that these platforms are not used by your users. 2) When you provide fixes for the same bugs in a different way. These seem like reasonable guidelines. I have in the end avoided using ‘--avoid’, but will keep these in mind should the need arise. > +# Separating explicit from implicit gives an idea of how bad your > +# particular case of creeping gnulibitis has developed. --ttn I don't think it is generally useful to repeat a program's input in its output. The output should contain some level of information that the user is not aware of. Normally people are aware which gnulib modules they have specified. If not, they can look it up in the gnulib-cache.m4 file. I agree, now that i've had a chance to use gnulib more. (Thanks for reviewing the patch, btw.) To me, somewhat interesting is a count of the specified modules (i.e., aggregate information that i am not directly aware of), and really interesting is the full list of "support modules" (non-specified dependencies). The latter because it gives me an idea of the project's "utility" of gnulib (roughly, the ratio between specified and supported modules -- higher is better). I feel good increasing the utility; more aware of the code and its inter/intra-relationships. This is especially important for code that i did not originally write (in this case GNU RCS). Listing the support modules instead of simply counting them is a nice way to get ideas, too -- "hey, this looks interesting, why don't i use that explicitly". For this reason, I would not like to apply your patch. Fair enough. FWIW, please find below a revised patch. Note that this post's subject and the patch title now differ. > + sed -e 's|.*|/&/d|' "$tmp"/want > "$tmp"/want.sed > + echo '(dependencies)' > + echo "$modules" | sed -f "$tmp"/want.sed | sed -e 's/^/ /' The autoconf documentation, section "Limitations of Usual Tools", mentions that "HP-UX sed has a limit of 99 commands". But one can have several module names specified to gnulib-tool. Therefore, the more portable (and more efficient) way to produce the difference set between two sets of module names is through the 'join' program. Thanks for the tip. The revised patch uses join(1). thi ____________________________________________________________
>From 000c6f480ec6f7acce19f95f13d2c358915f678a Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen <t...@gnuvola.org> Date: Thu, 10 Jun 2010 15:53:58 +0200 Subject: [PATCH] gnulib-tool: Display specified modules count, list of support modules. * gnulib-tool (func_import): Don't display "Module list with included dependencies". Instead, display the number of specified modules and a list of the support modules (non-specified dependencies). Signed-off-by: Thien-Thi Nguyen <t...@gnuvola.org> --- ChangeLog | 7 +++++++ gnulib-tool | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2bc2aa..c475317 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-10 Thien-Thi Nguyen <t...@gnuvola.org> + + gnulib-tool: Display specified modules count, list of support modules. + * gnulib-tool (func_import): Don't display "Module list with included + dependencies". Instead, display the number of specified modules and + a list of the support modules (non-specified dependencies). + 2010-05-25 Ralf Wildenhues <ralf.wildenh...@gmx.de> Add missing include in test-pwrite.c. diff --git a/gnulib-tool b/gnulib-tool index 150ac6b..c678262 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -3591,8 +3591,12 @@ func_import () modules="$specified_modules" func_modules_transitive_closure if test $verbose -ge 0; then - echo "Module list with included dependencies:" - echo "$modules" | sed -e 's/^/ /' + # Don't display the specified modules; the user already knows that. + # Nonetheless, a count is handy for monitoring creeping gnulibitis. --ttn + echo "Number of specified modules:" `echo "$specified_modules" | wc -l` + echo "Support modules (non-specified dependencies):" + echo "$specified_modules" | sed 's/$/ |/' > "$tmp"/want + echo "$modules" | LC_ALL=C join -a 1 - "$tmp"/want | sed '/|$/d;s/^/ /' fi final_modules="$modules" -- 1.6.3.2