public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Aditya Kurdunkar <adityakurdunkar2@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Aditya Kurdunkar <adityakurdunkar2@gmail.com>
Subject: [PATCH] externalsrc: fix duplicate entries in .git/info/exclude
Date: Thu, 19 Feb 2026 04:25:44 +0530	[thread overview]
Message-ID: <20260218225544.3523943-1-adityakurdunkar2@gmail.com> (raw)

`readlines()` preserves trailing newlines, so the duplicate check
against the stripped link name never matched. Strip lines before
comparing to prevent repeated entries on each devtool modify run.

Signed-off-by: Aditya Kurdunkar <adityakurdunkar2@gmail.com>
---
 meta/classes/externalsrc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 527c99ab69..902ff2604f 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -188,7 +188,7 @@ python externalsrc_configure_prefunc() {
             git_exclude_file = os.path.join(git_dir, 'info/exclude')
             if os.path.exists(git_exclude_file):
                 with open(git_exclude_file, 'r+') as efile:
-                    elines = efile.readlines()
+                    elines = [line.strip() for line in efile]
                     for link in newlinks:
                         if link in elines or '/'+link in elines:
                             continue
-- 
2.43.0



             reply	other threads:[~2026-02-18 22:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 22:55 Aditya Kurdunkar [this message]
2026-03-16  3:31 ` [PATCH] externalsrc: fix duplicate entries in .git/info/exclude Aditya Kurdunkar
2026-03-16  6:58   ` [OE-core] " Mathieu Dubois-Briand

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=20260218225544.3523943-1-adityakurdunkar2@gmail.com \
    --to=adityakurdunkar2@gmail.com \
    --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