From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v6] dependencies.sh: improve the missing perl modules detection
Date: Tue, 29 Sep 2015 09:28:58 +0100 [thread overview]
Message-ID: <560A4BCA.20906@imgtec.com> (raw)
In-Reply-To: <20150928225612.2a12b1c9@free-electrons.com>
Hi Thomas,
thanks a lot for your review. See comments below, please.
On 09/28/2015 09:56 PM, Thomas Petazzoni wrote:
> Vicente,
>
> I think the patch is great, but there are some implementation issues,
> see below.
>
> On Fri, 25 Sep 2015 11:06:25 +0100, Vicente Olivert Riera wrote:
>
>> -# Check that the Perl installation is complete enough to build
>> -# host-autoconf.
>> -if ! perl -e "require Data::Dumper" > /dev/null 2>&1 ; then
>> - echo "Your Perl installation is not complete enough, at least Data::Dumper is missing."
>> - echo "On Debian/Ubuntu distributions, install the 'perl' package."
>> +# Check that the Perl installation is complete enough for Buildroot.
>> +# Here is the space-separated list of the required modules.
>
> The space-separated comment doesn't make much sense IMO.
Uhm..., ok. I think having two examples (Data::Dumper and Thread:Queue)
is enough to understand how to add more modules to the list. I will
remove the comment.
>> +required_perl_modules="Data::Dumper" # Needed to build host-autoconf
>> +required_perl_modules+=" Thread:Queue" # Used by host-automake
>
> The += operator is bash specific, and not POSIX compliant. Since this
> dependencies.sh script specifies #!/bin/sh, you're not guaranteed to be
> executed with bash.
Totally true, I will fix that. Thanks!
>> +
>> +# This variable will keep the modules that are missing in your system.
>> +missing_perl_modules=""
>> +
>> +for pm in $required_perl_modules ; do
>> + if ! perl -e "require $pm" > /dev/null 2>&1 ; then
>> + missing_perl_modules+=" $pm"
>
> Ditto.
Noted.
>> + fi
>> +done
>> +
>> +if [ -n "$missing_perl_modules" ] ; then
>> + echo "Your Perl installation is not complete enough; at least the following"
>> + echo "modules are missing:"
>> + echo ""
>
> Quotes not needed here, just "echo" is sufficient.
Yeah, that's right.
>> + for pm in $missing_perl_modules ; do
>> + echo -e "\t $pm"
>> + done
>> + echo ""
>
> Ditto.
Noted.
I will send a new version today.
Regards,
Vincent.
> Thomas
>
prev parent reply other threads:[~2015-09-29 8:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 10:06 [Buildroot] [PATCH v6] dependencies.sh: improve the missing perl modules detection Vicente Olivert Riera
2015-09-28 20:56 ` Thomas Petazzoni
2015-09-29 8:28 ` Vicente Olivert Riera [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=560A4BCA.20906@imgtec.com \
--to=vincent.riera@imgtec.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox