public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] externalsrc: fix duplicate entries in .git/info/exclude
@ 2026-02-18 22:55 Aditya Kurdunkar
  2026-03-16  3:31 ` Aditya Kurdunkar
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Kurdunkar @ 2026-02-18 22:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: Aditya Kurdunkar

`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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-16  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18 22:55 [PATCH] externalsrc: fix duplicate entries in .git/info/exclude Aditya Kurdunkar
2026-03-16  3:31 ` Aditya Kurdunkar
2026-03-16  6:58   ` [OE-core] " Mathieu Dubois-Briand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox