public inbox for bitbake-devel@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Zk47T" <zizuzacker@gmail.com>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] bitbake: Resolve symlink duplicates in layer paths
Date: Sat, 04 Apr 2026 22:29:42 -0700	[thread overview]
Message-ID: <275547.1775366982271565372@lists.openembedded.org> (raw)
In-Reply-To: <112696b9cf819c10a162830a2e7759cf188ba216.camel@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

The user doesn't intentionally add the same layer twice — this happens when the working directory uses a symlink path (e.g., /home/pokybuild → /srv/ pokybuild ). Running bitbake-layers add-layer /srv/pokybuild/.../meta-mingw resolves to a different string than what's already in bblayers.conf (which was set via the symlink path), causing ERROR: Found duplicated BBFILE_COLLECTIONS.

The main fix is using os.path.realpath() inste ad of os.path.abspath() in do_ add_layer() and canonicalise_ path() , which prevents the duplicate from being added in the first place.

Regarding the warning in cookerdata.py — I can remove it if you prefer silent deduplication. I added it for visibility when users have manually edited bblayers.conf with symlink paths. Would you prefer it to silently resolve duplicates instead?

This behavior as you shared in root ticket bugzilla https://bugzilla.yoctoproject. org/show_bug.cgi?id=15591 ( https://bugzilla.yoctoproject.org/show_bug.cgi?id=15591 )

I try to implement the fix

[-- Attachment #2: Type: text/html, Size: 4716 bytes --]

      reply	other threads:[~2026-04-05  5:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03 15:33 [PATCH] bitbake: Resolve symlink duplicates in layer paths Zk47T
2026-04-04 20:58 ` [bitbake-devel] " Richard Purdie
2026-04-05  5:29   ` Zk47T [this message]

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=275547.1775366982271565372@lists.openembedded.org \
    --to=zizuzacker@gmail.com \
    --cc=bitbake-devel@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