Re: [oe] [PATCH] [meta classes] sed -i destroys symlinks

2023-11-08 Thread Joakim Tjernlund via lists.openembedded.org
On Wed, 2023-11-08 at 11:47 +0100, Jörg Sommer wrote: > On 07.11.23 21:24, Joakim Tjernlund via lists.openembedded.org wrote: > > In /etc/passwd is a symlink, sed -i on same file will replace the > > I suspect the »In« should be an »If« Yes :) > > > symlink with a new file. Prevent that by

Re: [oe] [PATCH] [meta classes] sed -i destroys symlinks

2023-11-08 Thread Jörg Sommer via lists . openembedded . org
On 07.11.23 21:24, Joakim Tjernlund via lists.openembedded.org wrote: > In /etc/passwd is a symlink, sed -i on same file will replace the I suspect the »In« should be an »If« > symlink with a new file. Prevent that by expanding the file with realpath > before giving it to sed. Using `sed -i`

Re: [oe] [PATCH] [meta classes] sed -i destroys symlinks

2023-11-07 Thread Ross Burton
Hi, You meant to set this to openembedded-c...@lists.openembedded.org . Cheers, Ross > On 7 Nov 2023, at 20:24, Joakim Tjernlund via lists.openembedded.org > wrote: > > In /etc/passwd is a symlink, sed -i on same file will replace the >

[oe] [PATCH] [meta classes] sed -i destroys symlinks

2023-11-07 Thread Joakim Tjernlund via lists.openembedded.org
In /etc/passwd is a symlink, sed -i on same file will replace the symlink with a new file. Prevent that by expanding the file with realpath before giving it to sed. --- meta/classes/rootfs-postcommands.bbclass | 4 ++-- meta/classes/useradd_base.bbclass| 2 +- 2 files changed, 3