2008-01-25 10:30:38     help doesn't run in menuconfig (trunk)

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-01-25 10:30:38     help doesn't run in menuconfig (trunk)

Andrea Federico (UNITED STATES)

Message: 50149    if you do in trunk :

make config_menuconfig

help doesn't run.

 

The problem is in this file:

----------------------------------------------------------

uclinux/config/scripts/Menuconfig, line 389:

----------------------------------------------------------

         text=$(awk -v var="${var}" '

        {

            regexp = "^" var "[[:space:]]*$"

            if ($1 !~ regexp)

                next

            text = var ":\n"

            getline

            while ($0 !~ /^[^[:space:]]/) {

                if ($0 !~ /^#/) {

                    sub(/^  /,"")

                    text = text "\n" $0

                }

                getline

            }

        }

        END { print text }' ${HELP_FILE} ${extra_help})

----------------------------------------------------------------------

 

the previous code was this:

----------------------------------------------------------------------

text=$(sed -n "/^$var[     ]*\$/,\${

                        /^$var[     ]*\$/c\\

${var}:\\

 

                        /^#/b

                        /^[^     ]/q

                        s/^  //

                        p

                    }" ${HELP_FILE} ${extra_help})

----------------------------------------------------------------------

 

this is the link of diff

http://blackfin.uclinux.org/gf/project/uclinux-dist/scmsvn/?action=browse&path=%2Ftrunk%2Fconfig%2Fscripts%2FMenuconfig&r1=4823&r2=5317

QuoteReplyEditDelete

 

 

2008-01-25 11:12:24     Re: help doesn't run in menuconfig (trunk)

Mike Frysinger (UNITED STATES)

Message: 50154    works fine for me

 

make config_menuconfig

hit the question mark

 

select some option (like init)

hit the question mark

QuoteReplyEditDelete

 

 

2008-01-25 11:43:09     Re: help doesn't run in menuconfig (trunk)

Andrea Federico (UNITED STATES)

Message: 50161    Hi Mike:

doesn't works, I start from a clean distribution (svn checkout) from trunk

and if I hit the question mark I see this message:

 

------------------------------------------------------------------

CONFIG_USER_INIT_INIT:

There is no help available for this kernel option.

------------------------------------------------------------------

 

this message say "kernel option", I think something is wrong.

QuoteReplyEditDelete

 

 

2008-01-25 12:03:33     Re: help doesn't run in menuconfig (trunk)

Mike Frysinger (UNITED STATES)

Message: 50163    it uses kconfig which comes from the kernel, so there's nothing odd about that

 

instead of toying around in the menuconfig system, just run the command in question by hand on the command line

 

this too works for me:

$ awk -v var="CONFIG_USER_INIT_INIT" '

        {

            regexp = "^" var "[[:space:]]*$"

            if ($1 !~ regexp)

                next

            text = var ":\n"

            getline

            while ($0 !~ /^[^[:space:]]/) {

                if ($0 !~ /^#/) {

                    sub(/^  /,"")

                    text = text "\n" $0

                }

                getline

            }

        }

        END { print text }' config/Configure.help

CONFIG_USER_INIT_INIT:

 

Include the init executable (highly recommended).

Approx. binary size: 14k

QuoteReplyEditDelete

 

 

2008-01-28 04:01:27     Re: help doesn't run in menuconfig (trunk)

Andrea Federico (UNITED STATES)

Message: 50202    Hi Mike,

I have two computer with ubuntu (dapper drake) installed.

In the first I have awk linked with gawk and your script works well.

In the second I have awk linked with mawk and your script doesn't work.

 

after some test with mawk I see the problem is in this predefined class name:

[:space:]

 

If I substitute [:space:] with a space the script run with gawk and mawk.

 

$ awk -v var="CONFIG_USER_INIT_INIT" '

        {

            regexp = "^" var "[ ]*$"

            if ($1 !~ regexp)

                next

            text = var ":\n"

            getline

            while ($0 !~ /^[^ *]/) {

                if ($0 !~ /^#/) {

                    sub(/^  /,"")

                    text = text "\n" $0

                }

                getline

            }

        }

        END { print text }' config/Configure.help

QuoteReplyEditDelete

 

 

2008-01-28 04:21:21     Re: help doesn't run in menuconfig (trunk)

Mike Frysinger (UNITED STATES)

Message: 50203    if mawk does not support [:space:], it is not POSIX compliant and thus should not be providing the "awk" binary

QuoteReplyEditDelete

 

 

2008-01-28 04:42:36     Re: help doesn't run in menuconfig (trunk)

Andrea Federico Grisotto (ITALY)

Message: 50204    Hi Mike,

I'm not a POSIX expert but this an extract of man page :

 

man mawk:

...

mawk conforms to the Posix 1003.2 (draft 11.3) definition of the AWK language which

contains a few features not described in the AWK book,  and mawk provides a small number of extensions.

...

 

 

man gawk

...

 

It conforms to the definition of the language in the POSIX 1003.2 Command Language And Utilities Standard.  This version in turn is based on the description in The AWK Programming Language, by Aho, Kernighan, and Weinberger, with the additional features found in the System V Release 4 version of UNIX awk.  Gawk also provides more recent Bell Laboratories awk extensions, and a number of GNU-specific extensions.

...

QuoteReplyEditDelete

 

 

2008-01-28 04:54:17     Re: help doesn't run in menuconfig (trunk)

Mike Frysinger (UNITED STATES)

Message: 50205    it's an easy test ...

 

echo "A BIG COW" | awk '$0 ~ /^A[[:space:]]*BIG[[:space:]]*COW$/ { print }'

 

if that works, it is POSIX compliant ... if it doesnt, the awk is broken and cannot provide "awk" on your system

QuoteReplyEditDelete

 

 

2008-01-28 05:15:29     Re: help doesn't run in menuconfig (trunk)

Andrea Federico Grisotto (ITALY)

Message: 50208    thank you Mike,

the last test does not run with mawk.

I remove mawk and install gawk.

QuoteReplyEditDelete

 

 

2008-01-28 08:21:54     Re: help doesn't run in menuconfig (trunk)

Robin Getz (UNITED STATES)

Message: 50225    I think this is why in:

 

http://docs.blackfin.uclinux.org/doku.php?id=installing_linux#apt-get_based_distributions

 

we list "gawk" - you should double check the rest of the packages as well.

 

-Robin

QuoteReplyEditDelete

 

 

2008-01-28 08:55:31     Re: help doesn't run in menuconfig (trunk)

Andrea Federico Grisotto (ITALY)

Message: 50230    I had not seen that existed that doc page

thanks

Attachments

    Outcomes