Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: RE: [OE-core] [PATCH 04/28] devtool: auto-pick 'main' branch in addition to 'master' in upgrades
Date: Thu, 17 Feb 2022 17:36:21 +0000	[thread overview]
Message-ID: <41d3206a0e2d4aa392e80483a503cb86@axis.com> (raw)
In-Reply-To: <20220217160939.1424397-4-alex@linutronix.de>

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Alexander Kanavin
> Sent: den 17 februari 2022 17:09
> To: openembedded-core@lists.openembedded.org
> Cc: Alexander Kanavin <alex@linutronix.de>
> Subject: [OE-core] [PATCH 04/28] devtool: auto-pick 'main' branch in addition to 'master' in upgrades
> 
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>  scripts/lib/devtool/upgrade.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
> index 826a3f955f..7957d41192 100644
> --- a/scripts/lib/devtool/upgrade.py
> +++ b/scripts/lib/devtool/upgrade.py
> @@ -192,7 +192,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
>              get_branch = [x.strip() for x in check_branch.splitlines()]
>              # Remove HEAD reference point and drop remote prefix
>              get_branch = [x.split('/', 1)[1] for x in get_branch if not x.startswith('origin/HEAD')]
> -            if 'master' in get_branch:
> +            if 'master' in get_branch or 'main' in get_branch:
>                  # If it is master, we do not need to append 'branch=master' as this is default.
>                  # Even with the case where get_branch has multiple objects, if 'master' is one
>                  # of them, we should default take from 'master'
> --
> 2.20.1

This seems incorrect since the branch= parameter is always 
required nowadays. I would more expect the code to look something 
like this:

            if len(get_branch) == 1:
                # If srcrev is on only ONE branch, then use that branch
                srcbranch = get_branch[0]
            elif 'main' in get_branch:
                # If srcrev is on multiple branches, then choose 'main' if it is one of them
                srcbranch = 'main'
            elif 'master' in get_branch:
                # Otherwise choose 'master' if it is one of the branches
                srcbranch = 'master'
            else:
                ...

//Peter



  reply	other threads:[~2022-02-17 17:36 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 16:09 [PATCH 01/28] gdb: update 11.1 -> 11.2 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 02/28] weston-init: replace deprecated/disabled fbdev with drm backend Alexander Kanavin
2022-02-17 19:54   ` [OE-core] " Khem Raj
2022-02-17 19:57     ` Alexander Kanavin
     [not found]     ` <16D4AB147C5087DA.27018@lists.openembedded.org>
2022-02-17 19:59       ` Alexander Kanavin
2022-02-17 20:03         ` Khem Raj
2022-02-17 20:04           ` Alexander Kanavin
     [not found]           ` <16D4AB76A8A77679.6551@lists.openembedded.org>
2022-02-17 20:16             ` Alexander Kanavin
2022-02-17 20:34               ` Khem Raj
2022-02-17 16:09 ` [PATCH 03/28] weston-init: disable systemd watchdog option Alexander Kanavin
2022-02-17 16:09 ` [PATCH 04/28] devtool: auto-pick 'main' branch in addition to 'master' in upgrades Alexander Kanavin
2022-02-17 17:36   ` Peter Kjellerstedt [this message]
2022-02-17 17:55     ` [OE-core] " Alexander Kanavin
     [not found]     ` <16D4A46679241182.18879@lists.openembedded.org>
2022-02-17 18:21       ` Alexander Kanavin
2022-02-17 20:02         ` Khem Raj
2022-02-17 16:09 ` [PATCH 05/28] gstreamer1.0: disable flaky gstbin:test_watch_for_state_change test Alexander Kanavin
2022-02-17 16:09 ` [PATCH 06/28] webkitgtk: drop patch merged upstream Alexander Kanavin
2022-02-17 16:09 ` [PATCH 07/28] webkitgtk: remove rejected patch Alexander Kanavin
2022-02-17 16:09 ` [PATCH 08/28] man-db: update 2.10.0 -> 2.10.1 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 09/28] vulkan: update 1.2.198 -> 1.3.204 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 10/28] vulkan-samples: update to latest revision Alexander Kanavin
2022-02-17 16:09 ` [PATCH 11/28] xkeyboard-config: update 2.34 -> 2.35.1 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 12/28] libgit2: update 1.3.0 -> 1.4.0 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 13/28] util-linux: upgrade 2.37.3 -> 2.37.4 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 14/28] python3-tomli: upgrade 2.0.0 -> 2.0.1 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 15/28] repo: upgrade 2.20 -> 2.21 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 16/28] help2man: upgrade 1.48.5 -> 1.49.1 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 17/28] meson: upgrade 0.61.1 -> 0.61.2 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 18/28] mmc-utils: upgrade to latest revision Alexander Kanavin
2022-02-17 16:09 ` [PATCH 19/28] python3-dtschema: upgrade 2021.12 -> 2022.1 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 20/28] python3-pytest: upgrade 7.0.0 -> 7.0.1 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 21/28] vala: upgrade 0.54.6 -> 0.54.7 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 22/28] gi-docgen: upgrade 2021.8 -> 2022.1 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 23/28] pango: upgrade 1.48.10 -> 1.50.4 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 24/28] piglit: upgrade to latest revision Alexander Kanavin
2022-02-17 16:09 ` [PATCH 25/28] shaderc: upgrade 2022.0 -> 2022.1 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 26/28] gst-examples: upgrade 1.18.5 -> 1.18.6 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 27/28] diffoscope: upgrade 202 -> 204 Alexander Kanavin
2022-02-17 16:09 ` [PATCH 28/28] libical: upgrade 3.0.13 -> 3.0.14 Alexander Kanavin

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=41d3206a0e2d4aa392e80483a503cb86@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    /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