From: Srinuvasan Arjunan <srinuvasanasv@gmail.com>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] classes/sdk.bbclass: remove additional "/" in new_target finding
Date: Mon, 3 Jul 2023 00:07:31 -0700 (PDT) [thread overview]
Message-ID: <095c5ab0-3c19-4247-970b-ea645540d5dfn@googlegroups.com> (raw)
In-Reply-To: <b8919fca-656a-dc4a-c2c8-66612f8e8d34@siemens.com>
[-- Attachment #1.1: Type: text/plain, Size: 2190 bytes --]
On Wednesday, June 28, 2023 at 12:42:52 PM UTC+5:30 Jan Kiszka wrote:
On 28.06.23 07:19, Srinuvasan Arjunan wrote:
> From: Srinuvasan A <srinuv...@siemens.com>
>
> We observed that one additional / present in finding the new_target,
> here target already start with /, hence no need to append the additional
> /.
>
> In functionality wise there is no change.
>
> Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
> ---
> meta/classes/sdk.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
> index c6dc689..f14b447 100644
> --- a/meta/classes/sdk.bbclass
> +++ b/meta/classes/sdk.bbclass
> @@ -100,7 +100,7 @@ sdkchroot_finalize() {
>
> if [ "${target#/}" != "${target}" ]; then
> basedir=$(dirname $link)
> - new_target=$(realpath --no-symlinks -m --relative-to=$basedir
${ROOTFSDIR}/${target})
> + new_target=$(realpath --no-symlinks -m --relative-to=$basedir
${ROOTFSDIR}${target})
>
Can you guarantee that ROOTFSDIR comes with a trailing / in ALL case?
I'm skeptical about that.
Actually ROOTFSDIR not contains / in all the cases, rather target always
start with /, hence the additional / is not needed.
f.e:
Debug Logs:
target=/etc/alternatives/lzma.1.gz
[ etc/alternatives/lzma.1.gz != /etc/alternatives/lzma.1.gz ]
dirname
/home/srinu/work/TEST/ISAR_REL_PATH_CHECK_TEST/build/tmp/work/debian-bullseye-armhf/isar-image-base-sdk-qemuarm/1.0-r0/rootfs/usr/share/man/man1/lzma.1.gz
basedir=/home/srinu/work/TEST/ISAR_REL_PATH_CHECK_TEST/build/tmp/work/debian-bullseye-armhf/isar-image-base-sdk-qemuarm/1.0-r0/rootfs/usr/share/man/man1
realpath --no-symlinks -m
--relative-to=/home/srinu/work/TEST/ISAR_REL_PATH_CHECK_TEST/build/tmp/work/debian-bullseye-armhf/isar-image-base-sdk-qemuarm/1.0-r0/rootfs/usr/share/man/man1
/home/srinu/work/TEST/ISAR_REL_PATH_CHECK_TEST/build/tmp/work/debian-bullseye-armhf/isar-image-base-sdk-qemuarm/1.0-r0/rootfs//etc/alternatives/lzma.1.gz
new_target=../../../../etc/alternatives/lzma.1.gz
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
[-- Attachment #1.2: Type: text/html, Size: 2926 bytes --]
next prev parent reply other threads:[~2023-07-03 7:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 5:19 Srinuvasan Arjunan
2023-06-28 7:12 ` Jan Kiszka
2023-07-03 7:07 ` Srinuvasan Arjunan [this message]
2023-07-03 10:59 ` Jan Kiszka
2023-07-04 10:24 Srinuvasan Arjunan
2023-07-11 6:40 ` Uladzimir Bely
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=095c5ab0-3c19-4247-970b-ea645540d5dfn@googlegroups.com \
--to=srinuvasanasv@gmail.com \
--cc=isar-users@googlegroups.com \
/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