Skip to contentSkip to conversation

externalsrc: fix duplicate entries in .git/info/exclude

PATCH In review Aditya Kurdunkar 2 participants 3 messages Feb 18 – Mar 16

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 externalsrc: fix duplicate entries in .git/info/exclude

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.

---
 meta/classes/externalsrc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +1 -1
index 527c99ab69..902ff2604f 100644
@@ -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
Signature · 1 line
2.43.0
#1 lore raw

Hi everyone,
I’m new to contributing to the OpenEmbedded project. Could someone please let me know the process for getting this patch reviewed?

#2 lore raw
Quoted 2 lines · Aditya Kurdunkar via lists.openembedded.org

Hi everyone,
I’m new to contributing to the OpenEmbedded project. Could someone please let me know the process for getting this patch reviewed?

Hi,

Your patch was already merged. Thanks for your patch!

https://git.openembedded.org/openembedded-core/commit/?id=4f96eaa0981b5d88a90de7641150423c01543d58

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com