[Toybox] [PATCH] python2 probing
Elie De Brauwer
eliedebrauwer at gmail.com
Fri Aug 30 15:08:28 PDT 2013
Hello Rob, list,
I just found the README.txt in the generated folder, obviously my
patch won't play nice if you plan to ship generated help.h's. Hence
complaining due to absence of python isn't that polite either, so the
check would probably be something like 'if python not found, and
help.h isn't there, and help is requested' then complain. Which will
then only happen when working from mercurial and not from source
tarballs, ... but this is imho a rather awkward situation ...
gr
E.
On Sat, Aug 31, 2013 at 12:00 AM, Elie De Brauwer
<eliedebrauwer at gmail.com> wrote:
> Hi Rob, list,
>
> When I try building tip currently (make clean; make defconfig; make ),
> the compilation aborts with:
>
> Compile toybox...
> lib/help.c:8:28: fatal error: generated/help.h: No such file or directory
> compilation terminated.
> make: *** [toybox] Error 1
>
> On my system this is because make.sh contains
>
> PYTHON="$(which python2)"
> if [ ! -z "$PYTHON" ] &&
> [ ! -z "$(grep 'CONFIG_TOYBOX_HELP=y' $KCONFIG_CONFIG)" ]
> then
> echo "Extract help text from Config.in."
> "$PYTHON" scripts/config2help.py Config.in > generated/help.h || exit 1
> fi
>
>
> But my system (Debian 7.0) has no python2 symlink. It actually does
> have python2.6 and python2.7 symlinks. So I would at least advice to
> check for any of the earlier to exist, rather than python2.
>
> Another issue is that it's not very graceful in error handling.
>
> Attached you can find a patch which searches for python, python2.6 and
> python2.7 (in that order) and prints out a friendly warning if the
> user requested help but python2.x could not be found.
>
> my 2 cents
> E.
>
> --
> Elie De Brauwer
--
Elie De Brauwer
1377900508.0
More information about the Toybox
mailing list