public inbox for bitbake-devel@lists.openembedded.org
 help / color / mirror / Atom feed
From: Anibal Limon <anibal@limonsoftware.com>
To: bitbake-devel@lists.openembedded.org
Cc: antonin.godard@bootlin.com, richard.purdie@linuxfoundation.org,
	Anibal Limon <anibal@limonsoftware.com>
Subject: [PATCH] bitbake-setup: fix are_layers_changed when use local source
Date: Sun, 21 Dec 2025 00:47:21 +0000	[thread overview]
Message-ID: <20251221004721.35098-1-anibal@limonsoftware.com> (raw)

When use local source the git-remote isn't set causing exception because
takes repodir as default value.

Fixes:

```
NOTE: Looking up config ls-master in configuration registry
Traceback (most recent call last):
  File "/home/workspaces/ls/bitbake/bin/bitbake-setup", line 1042, in <module>
    main()
    ~~~~^^
  File "/home/workspaces/ls/bitbake/bin/bitbake-setup", line 1035, in main
    args.func(top_dir, all_settings, args, d)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/workspaces/ls/bitbake/bin/bitbake-setup", line 667, in build_update
    build_status(top_dir, settings, args, d, update=True)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/workspaces/ls/bitbake/bin/bitbake-setup", line 658, in build_status
    if are_layers_changed(current_upstream_config["data"]["sources"], layerdir, d):
       ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/workspaces/ls/bitbake/bin/bitbake-setup", line 627, in are_layers_changed
    changed = changed | _is_git_remote_changed(git_remote, repodir)
                        ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/workspaces/ls/bitbake/bin/bitbake-setup", line 601, in _is_git_remote_changed
    rev = r_remote['rev']
          ~~~~~~~~^^^^^^^
TypeError: string indices must be integers, not 'str'
```

Signed-off-by: Anibal Limon <anibal@limonsoftware.com>
---
 bin/bitbake-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index d19aee971..cb7da73d3 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -622,7 +622,7 @@ def are_layers_changed(layers, layerdir, d):
         r_data = layers[r_name]
         repodir = r_data.get("path", r_name)
 
-        git_remote = r_data.get('git-remote', repodir)
+        git_remote = r_data.get('git-remote', '')
         if git_remote:
             changed = changed | _is_git_remote_changed(git_remote, repodir)
 
-- 
2.47.3



                 reply	other threads:[~2025-12-21  0:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20251221004721.35098-1-anibal@limonsoftware.com \
    --to=anibal@limonsoftware.com \
    --cc=antonin.godard@bootlin.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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