On Sat, 2023-12-16 at 14:53 +0100, Etienne Cordonnier via
lists.openembedded.org wrote:
> From: Etienne Cordonnier <[email protected]>
> 
> The function do_symlink_kernsrc is not reentrant in the case where S is 
> defined
> to a non-default value. This causes build-failures e.g. when building 
> linux-yocto, then updating
> poky to a commit which modifies kernel.bbclass, and then building linux-yocto 
> again.
> 
> Bugzilla: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15325
> 
> Signed-off-by: Etienne Cordonnier <[email protected]>
> ---
>  meta/classes-recipe/kernel.bbclass | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/meta/classes-recipe/kernel.bbclass 
> b/meta/classes-recipe/kernel.bbclass
> index 9ff37f5c38..130bedd901 100644
> --- a/meta/classes-recipe/kernel.bbclass
> +++ b/meta/classes-recipe/kernel.bbclass
> @@ -194,6 +194,11 @@ python do_symlink_kernsrc () {
>              os.symlink(s, kernsrc)
>          else:
>              import shutil
> +            if os.path.islink(s):
> +                # this happens for instance when a poky update forces 
> symlink_kernsrc to run again
> +                # after s was already moved to kernsrc
> +                bb.warn("%s is already a symlink! Not symlinking kernel 
> sources" % s)
> +                return 0
>              shutil.move(s, kernsrc)
>              os.symlink(kernsrc, s)
>  }

Usually what we recommend is that the first pass does something if "if
not exists X.org; cp X X.orig; fi", then you can always copy from
X.orig.

As Bruce says, it definitely shouldn't be a warning, this can happen
quite normally. 

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192591): 
https://lists.openembedded.org/g/openembedded-core/message/192591
Mute This Topic: https://lists.openembedded.org/mt/103208527/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to