diff mbox

[U-Boot,v2] MAKEALL: fix get_target_arch() to adjust to '-' in Status field

Message ID 1427716788-30297-1-git-send-email-yamada.masahiro@socionext.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada March 30, 2015, 11:59 a.m. UTC
Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
generated by tools/genboardscfg.py.  Every board is supposed to have
its own MAINTAINERS that contains maintainer and status information,
but, in fact, MAINTAINERS is missing from some boards.

For such boards, the first field, Status, is filled with '-'.
It causes a problem for "set" command, which ignores '-' in its
arguments.  Consequently, get_target_arch() returns a wrong field
and MAKEALL fails to get a correct toolchain.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  - Improve git description

---

 MAKEALL | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Simon Glass April 1, 2015, 2:39 a.m. UTC | #1
Hi Masahiro,

On 30 March 2015 at 05:59, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
> generated by tools/genboardscfg.py.  Every board is supposed to have
> its own MAINTAINERS that contains maintainer and status information,
> but, in fact, MAINTAINERS is missing from some boards.
>
> For such boards, the first field, Status, is filled with '-'.
> It causes a problem for "set" command, which ignores '-' in its
> arguments.  Consequently, get_target_arch() returns a wrong field
> and MAKEALL fails to get a correct toolchain.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>   - Improve git description

Should we perhaps apply the patch to deprecate MAKEALL?

Regards,
Simon
Tom Rini April 1, 2015, 11:19 a.m. UTC | #2
On Tue, Mar 31, 2015 at 08:39:57PM -0600, Simon Glass wrote:

> Hi Masahiro,
> 
> On 30 March 2015 at 05:59, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> > Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
> > generated by tools/genboardscfg.py.  Every board is supposed to have
> > its own MAINTAINERS that contains maintainer and status information,
> > but, in fact, MAINTAINERS is missing from some boards.
> >
> > For such boards, the first field, Status, is filled with '-'.
> > It causes a problem for "set" command, which ignores '-' in its
> > arguments.  Consequently, get_target_arch() returns a wrong field
> > and MAKEALL fails to get a correct toolchain.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >   - Improve git description
> 
> Should we perhaps apply the patch to deprecate MAKEALL?

With the last patch I posted about what binaries to save all my usecases
are covered now.
Simon Glass April 5, 2015, 6:31 p.m. UTC | #3
Hi Tom,

On 1 April 2015 at 05:19, Tom Rini <trini@konsulko.com> wrote:
> On Tue, Mar 31, 2015 at 08:39:57PM -0600, Simon Glass wrote:
>
>> Hi Masahiro,
>>
>> On 30 March 2015 at 05:59, Masahiro Yamada
>> <yamada.masahiro@socionext.com> wrote:
>> > Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
>> > generated by tools/genboardscfg.py.  Every board is supposed to have
>> > its own MAINTAINERS that contains maintainer and status information,
>> > but, in fact, MAINTAINERS is missing from some boards.
>> >
>> > For such boards, the first field, Status, is filled with '-'.
>> > It causes a problem for "set" command, which ignores '-' in its
>> > arguments.  Consequently, get_target_arch() returns a wrong field
>> > and MAKEALL fails to get a correct toolchain.
>> >
>> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> >   - Improve git description
>>
>> Should we perhaps apply the patch to deprecate MAKEALL?
>
> With the last patch I posted about what binaries to save all my usecases
> are covered now.

OK, do you think we can wait until the merge window before doing
these? I don't see any great hurry.

Regards,
Simon
Masahiro Yamada April 6, 2015, 3:08 a.m. UTC | #4
Hi Simon, Tom,


2015-04-06 3:31 GMT+09:00 Simon Glass <sjg@chromium.org>:
> Hi Tom,
>
> On 1 April 2015 at 05:19, Tom Rini <trini@konsulko.com> wrote:
>> On Tue, Mar 31, 2015 at 08:39:57PM -0600, Simon Glass wrote:
>>
>>> Hi Masahiro,
>>>
>>> On 30 March 2015 at 05:59, Masahiro Yamada
>>> <yamada.masahiro@socionext.com> wrote:
>>> > Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
>>> > generated by tools/genboardscfg.py.  Every board is supposed to have
>>> > its own MAINTAINERS that contains maintainer and status information,
>>> > but, in fact, MAINTAINERS is missing from some boards.
>>> >
>>> > For such boards, the first field, Status, is filled with '-'.
>>> > It causes a problem for "set" command, which ignores '-' in its
>>> > arguments.  Consequently, get_target_arch() returns a wrong field
>>> > and MAKEALL fails to get a correct toolchain.
>>> >
>>> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> >   - Improve git description
>>>
>>> Should we perhaps apply the patch to deprecate MAKEALL?
>>
>> With the last patch I posted about what binaries to save all my usecases
>> are covered now.
>
> OK, do you think we can wait until the merge window before doing
> these? I don't see any great hurry.
>

I know MAKEALL is deprecated, but I still use it with a local-hack to
compare MD5SUM.

Buildman is a bigger program than MAKEALL and I have not been able to
find time to
dig into it.

The above is my personal reason, but this patch is an apparent bug-fix
and it is easy enough.
Why don't we fix it?
Simon Glass April 6, 2015, 3:25 a.m. UTC | #5
Hi Masahiro,

On 5 April 2015 at 21:08, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
> Hi Simon, Tom,
>
>
> 2015-04-06 3:31 GMT+09:00 Simon Glass <sjg@chromium.org>:
> > Hi Tom,
> >
> > On 1 April 2015 at 05:19, Tom Rini <trini@konsulko.com> wrote:
> >> On Tue, Mar 31, 2015 at 08:39:57PM -0600, Simon Glass wrote:
> >>
> >>> Hi Masahiro,
> >>>
> >>> On 30 March 2015 at 05:59, Masahiro Yamada
> >>> <yamada.masahiro@socionext.com> wrote:
> >>> > Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
> >>> > generated by tools/genboardscfg.py.  Every board is supposed to have
> >>> > its own MAINTAINERS that contains maintainer and status information,
> >>> > but, in fact, MAINTAINERS is missing from some boards.
> >>> >
> >>> > For such boards, the first field, Status, is filled with '-'.
> >>> > It causes a problem for "set" command, which ignores '-' in its
> >>> > arguments.  Consequently, get_target_arch() returns a wrong field
> >>> > and MAKEALL fails to get a correct toolchain.
> >>> >
> >>> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >>> >   - Improve git description
> >>>
> >>> Should we perhaps apply the patch to deprecate MAKEALL?
> >>
> >> With the last patch I posted about what binaries to save all my usecases
> >> are covered now.
> >
> > OK, do you think we can wait until the merge window before doing
> > these? I don't see any great hurry.
> >
>
> I know MAKEALL is deprecated, but I still use it with a local-hack to
> compare MD5SUM.
>
> Buildman is a bigger program than MAKEALL and I have not been able to
> find time to
> dig into it.
>
> The above is my personal reason, but this patch is an apparent bug-fix
> and it is easy enough.
> Why don't we fix it?

I wan't suggesting we don't fix it! I agree you patch is a good thing
- it just jogged my memory about MAKEALL deprecation.

Regards,
Simon
Tom Rini April 7, 2015, 12:37 a.m. UTC | #6
On Sun, Apr 05, 2015 at 12:31:44PM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 1 April 2015 at 05:19, Tom Rini <trini@konsulko.com> wrote:
> > On Tue, Mar 31, 2015 at 08:39:57PM -0600, Simon Glass wrote:
> >
> >> Hi Masahiro,
> >>
> >> On 30 March 2015 at 05:59, Masahiro Yamada
> >> <yamada.masahiro@socionext.com> wrote:
> >> > Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
> >> > generated by tools/genboardscfg.py.  Every board is supposed to have
> >> > its own MAINTAINERS that contains maintainer and status information,
> >> > but, in fact, MAINTAINERS is missing from some boards.
> >> >
> >> > For such boards, the first field, Status, is filled with '-'.
> >> > It causes a problem for "set" command, which ignores '-' in its
> >> > arguments.  Consequently, get_target_arch() returns a wrong field
> >> > and MAKEALL fails to get a correct toolchain.
> >> >
> >> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >> >   - Improve git description
> >>
> >> Should we perhaps apply the patch to deprecate MAKEALL?
> >
> > With the last patch I posted about what binaries to save all my usecases
> > are covered now.
> 
> OK, do you think we can wait until the merge window before doing
> these? I don't see any great hurry.

I can continue cursing and doing make O=temp by hand for a bit longer,
sure ;)
diff mbox

Patch

diff --git a/MAKEALL b/MAKEALL
index cd3b6c7..3808a59 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -551,13 +551,7 @@  get_target_maintainers() {
 get_target_arch() {
 	local target=$1
 
-	# Automatic mode
-	local line=`awk '\$7 == "'"$target"'" { print \$0 }' boards.cfg`
-
-	if [ -z "${line}" ] ; then echo "" ; return ; fi
-
-	set ${line}
-	echo "$2"
+	awk '$7 == "'$target'" { print $2 }' boards.cfg
 }
 
 list_target() {