public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/11] buildman: Avoid overwriting existing toolchain entries
Date: Thu, 7 Jul 2016 12:21:44 -0600	[thread overview]
Message-ID: <577E9DB8.60501@wwwdotorg.org> (raw)
In-Reply-To: <1467580467-19186-9-git-send-email-sjg@chromium.org>

On 07/03/2016 03:14 PM, Simon Glass wrote:
> The current code for setting up the toolchain config always writes the new
> paths to an item called 'toolchain'. This means that it will overwrite any
> existing toolchain item with the same name. In practice, this means that:
>
>     buildman --fetch-arch all
>
> will fetch all toolchains, but only the path of the final one will be added
> to the config. This normally works out OK, since most toolchains are the
> same version (e.g. gcc 4.9) and will be found on the same path. But it is
> not correct and toolchains for archs which don't use the same version will
> not function as expected.
>
> Adjust the code to use unique names for each toolchain path entry.

> diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py

> +def GetItemsAsDict(section):
> +    """Get the items from a section of the config.
> +
> +    Args:
> +        section: name of section to retrieve
> +
> +    Returns:
> +        Dict:
> +           key: name of item
> +           value: value of item
> +    """
> +    try:
> +        items = {}
> +        for item in settings.items(section):
> +            items[item[0]] = item[1]

Aren't those last 3 lines equivalent to:

items = dict(settings.items(section))

  reply	other threads:[~2016-07-07 18:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-03 21:14 [U-Boot] [PATCH 00/11] buildman: Make the tool friendlier for first-time users Simon Glass
2016-07-03 21:14 ` [U-Boot] [PATCH 01/11] buildman: Tidy up the README a little Simon Glass
2016-07-08 14:27   ` Tom Rini
2016-07-03 21:14 ` [U-Boot] [PATCH 02/11] buildman: Automatically create a config file if needed Simon Glass
2016-07-07 18:15   ` Stephen Warren
2016-07-03 21:14 ` [U-Boot] [PATCH 03/11] buildman: Fix the 'help' test to use the correct path Simon Glass
2016-07-03 21:14 ` [U-Boot] [PATCH 04/11] buildman: Allow the toolchain error to be suppressed Simon Glass
2016-07-07 18:17   ` Stephen Warren
2016-07-03 21:14 ` [U-Boot] [PATCH 05/11] buildman: Improve the toolchain progress/error output Simon Glass
2016-07-08 14:27   ` Tom Rini
2016-07-03 21:14 ` [U-Boot] [PATCH 06/11] buildman: Fix a typo in TestSettingsHasPath() Simon Glass
2016-07-03 21:14 ` [U-Boot] [PATCH 07/11] buildman: Drop the toolchain error when downloading toolchains Simon Glass
2016-07-03 21:14 ` [U-Boot] [PATCH 08/11] buildman: Avoid overwriting existing toolchain entries Simon Glass
2016-07-07 18:21   ` Stephen Warren [this message]
2016-07-08 14:27   ` Tom Rini
2016-07-03 21:14 ` [U-Boot] [PATCH 09/11] buildman: Add a quick-start note Simon Glass
2016-07-07 18:23   ` Stephen Warren
2016-07-08 14:27     ` Tom Rini
2016-07-03 21:14 ` [U-Boot] [PATCH 10/11] Drop the MAKEALL tool Simon Glass
2016-07-08 14:27   ` Tom Rini
2016-07-03 21:14 ` [U-Boot] [PATCH 11/11] Drop references to MAKEALL in the documentation Simon Glass
2016-07-08 14:27   ` Tom Rini
2016-07-07 18:27 ` [U-Boot] [PATCH 00/11] buildman: Make the tool friendlier for first-time users Stephen Warren
2016-07-08 14:27   ` Tom Rini
2016-07-08 14:26 ` Tom Rini

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=577E9DB8.60501@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=u-boot@lists.denx.de \
    /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