public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] avoid double slash in generated rootfs umount paths
@ 2026-09-11 10:16 srinuvasan.a via isar-users
  2026-09-11 10:41 ` 'MOESSBAUER, Felix' via isar-users
  2026-09-11 10:49 ` 'Jan Kiszka' via isar-users
  0 siblings, 2 replies; 6+ messages in thread
From: srinuvasan.a via isar-users @ 2026-09-11 10:16 UTC (permalink / raw)
  To: isar-users; +Cc: Srinuvasan A

From: Srinuvasan A <srinuvasan.a@siemens.com>

ROOTFS_MOUNTS inner paths are absolute, e.g. /isar-apt and
/isar-work. insert_isar_umounts added another slash between ROOTFSDIR
and the inner path, producing paths like rootfs//isar-apt in the
expanded rootfs_do_umounts_priv task.

Strip the leading slash from the inner mount path when building the
mountpoint, matching the logic already used by insert_isar_mounts.

Logs:
mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-apt &&
 umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-apt

mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-work &&
 umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-work

Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
---
 meta/classes-global/base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index 8f81ab70..be663fe7 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -432,7 +432,7 @@ def insert_isar_umounts(d, rootfs, mounts):
 
     for m in mounts.split():
         host, inner = m.split(':') if ':' in m else (m, m)
-        mp = '{}/{}'.format(rootfs, inner)
+        mp = '{}/{}'.format(rootfs, inner[1:])
         lines.append('mountpoint -q {} && umount {}'.format(mp, mp))
         lines.append('[ -d {} ] && rmdir --ignore-fail-on-non-empty {}'.format(mp, mp))
     return '\n'.join(lines)
-- 
2.39.5

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260911101616.748091-1-srinuvasan.a%40siemens.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] avoid double slash in generated rootfs umount paths
  2026-09-11 10:16 [PATCH] avoid double slash in generated rootfs umount paths srinuvasan.a via isar-users
@ 2026-09-11 10:41 ` 'MOESSBAUER, Felix' via isar-users
  2026-09-11 10:49 ` 'Jan Kiszka' via isar-users
  1 sibling, 0 replies; 6+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2026-09-11 10:41 UTC (permalink / raw)
  To: Arjunan, Srinu, isar-users

On Fri, 2026-09-11 at 15:46 +0530, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuvasan.a@siemens.com>
> 
> ROOTFS_MOUNTS inner paths are absolute, e.g. /isar-apt and
> /isar-work. insert_isar_umounts added another slash between ROOTFSDIR
> and the inner path, producing paths like rootfs//isar-apt in the
> expanded rootfs_do_umounts_priv task.
> 
> Strip the leading slash from the inner mount path when building the
> mountpoint, matching the logic already used by insert_isar_mounts.

Thanks!

Reviewed-by: Felix Moessbauer <felix.moessbauer@siemens.com>

> 
> Logs:
> mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-apt &&
>  umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-apt
> 
> mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-work &&
>  umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-work
> 
> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
> ---
>  meta/classes-global/base.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
> index 8f81ab70..be663fe7 100644
> --- a/meta/classes-global/base.bbclass
> +++ b/meta/classes-global/base.bbclass
> @@ -432,7 +432,7 @@ def insert_isar_umounts(d, rootfs, mounts):
>  
>      for m in mounts.split():
>          host, inner = m.split(':') if ':' in m else (m, m)
> -        mp = '{}/{}'.format(rootfs, inner)
> +        mp = '{}/{}'.format(rootfs, inner[1:])
>          lines.append('mountpoint -q {} && umount {}'.format(mp, mp))
>          lines.append('[ -d {} ] && rmdir --ignore-fail-on-non-empty {}'.format(mp, mp))
>      return '\n'.join(lines)
> -- 
> 2.39.5
> 
> -- 
> You received this message because you are subscribed to the Google Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260911101616.748091-1-srinuvasan.a%40siemens.com.

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/c86c0b2f81e46a9a9d9f31a10e87af29c1a367a8.camel%40siemens.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] avoid double slash in generated rootfs umount paths
  2026-09-11 10:16 [PATCH] avoid double slash in generated rootfs umount paths srinuvasan.a via isar-users
  2026-09-11 10:41 ` 'MOESSBAUER, Felix' via isar-users
@ 2026-09-11 10:49 ` 'Jan Kiszka' via isar-users
  2026-09-11 11:12   ` 'Srinuvasan Arjunan' via isar-users
  1 sibling, 1 reply; 6+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-09-11 10:49 UTC (permalink / raw)
  To: srinuvasan.a, isar-users

On 11.09.26 12:16, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuvasan.a@siemens.com>
> 
> ROOTFS_MOUNTS inner paths are absolute, e.g. /isar-apt and
> /isar-work. insert_isar_umounts added another slash between ROOTFSDIR
> and the inner path, producing paths like rootfs//isar-apt in the
> expanded rootfs_do_umounts_priv task.
> 
> Strip the leading slash from the inner mount path when building the
> mountpoint, matching the logic already used by insert_isar_mounts.
> 
> Logs:
> mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-apt &&
>  umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-apt
> 
> mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-work &&
>  umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-work
> 
> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
> ---
>  meta/classes-global/base.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
> index 8f81ab70..be663fe7 100644
> --- a/meta/classes-global/base.bbclass
> +++ b/meta/classes-global/base.bbclass
> @@ -432,7 +432,7 @@ def insert_isar_umounts(d, rootfs, mounts):
>  
>      for m in mounts.split():
>          host, inner = m.split(':') if ':' in m else (m, m)
> -        mp = '{}/{}'.format(rootfs, inner)
> +        mp = '{}/{}'.format(rootfs, inner[1:])

This looks fragile. Why not strip off '/', rather than blindly cutting
the last char?

Jan

>          lines.append('mountpoint -q {} && umount {}'.format(mp, mp))
>          lines.append('[ -d {} ] && rmdir --ignore-fail-on-non-empty {}'.format(mp, mp))
>      return '\n'.join(lines)

-- 
Siemens AG, Foundational Technologies
Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/855faf99-5468-44da-8d6d-5472b87512e9%40siemens.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] avoid double slash in generated rootfs umount paths
  2026-09-11 10:49 ` 'Jan Kiszka' via isar-users
@ 2026-09-11 11:12   ` 'Srinuvasan Arjunan' via isar-users
  2026-09-11 11:20     ` 'Jan Kiszka' via isar-users
  0 siblings, 1 reply; 6+ messages in thread
From: 'Srinuvasan Arjunan' via isar-users @ 2026-09-11 11:12 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 2722 bytes --]



On Friday, September 11, 2026 at 4:19:31 PM UTC+5:30 Jan Kiszka wrote:

On 11.09.26 12:16, srinuvasan.a via isar-users wrote: 
> From: Srinuvasan A <srinuv...@siemens.com> 
> 
> ROOTFS_MOUNTS inner paths are absolute, e.g. /isar-apt and 
> /isar-work. insert_isar_umounts added another slash between ROOTFSDIR 
> and the inner path, producing paths like rootfs//isar-apt in the 
> expanded rootfs_do_umounts_priv task. 
> 
> Strip the leading slash from the inner mount path when building the 
> mountpoint, matching the logic already used by insert_isar_mounts. 
> 
> Logs: 
> mountpoint -q 
/work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-apt 
&& 
> umount 
/work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-apt 

> 
> mountpoint -q 
/work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-work 
&& 
> umount 
/work/build/tmp/work/debian-trixie-amd64/isar-image-base-qemuamd64/1.0-r0/rootfs//isar-work 

> 
> Signed-off-by: Srinuvasan A <srinuv...@siemens.com> 
> --- 
> meta/classes-global/base.bbclass | 2 +- 
> 1 file changed, 1 insertion(+), 1 deletion(-) 
> 
> diff --git a/meta/classes-global/base.bbclass 
b/meta/classes-global/base.bbclass 
> index 8f81ab70..be663fe7 100644 
> --- a/meta/classes-global/base.bbclass 
> +++ b/meta/classes-global/base.bbclass 
> @@ -432,7 +432,7 @@ def insert_isar_umounts(d, rootfs, mounts): 
> 
> for m in mounts.split(): 
> host, inner = m.split(':') if ':' in m else (m, m) 
> - mp = '{}/{}'.format(rootfs, inner) 
> + mp = '{}/{}'.format(rootfs, inner[1:]) 

This looks fragile. Why not strip off '/', rather than blindly cutting 
the last char? 

Jan


  Thanks for the comments,

  Here, inner[1:] strips the leading /, as we always assume the paths in 
ROOTFS_MOUNTS are absolute.

  For example:
  ROOTFS_MOUNTS ??= "${REPO_ISAR_DIR}/${DISTRO}:/isar-apt 
${WORKDIR}:/isar-work"

  This also follows the same pattern already used by insert_isar_mounts.

  Many thanks,

  Srinu



> lines.append('mountpoint -q {} && umount {}'.format(mp, mp)) 
> lines.append('[ -d {} ] && rmdir --ignore-fail-on-non-empty 
{}'.format(mp, mp)) 
> return '\n'.join(lines) 

-- 
Siemens AG, Foundational Technologies 
Linux Expert Center 

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/d3bd2de6-8c19-4ff0-8920-9f9506dee029n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3950 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] avoid double slash in generated rootfs umount paths
  2026-09-11 11:12   ` 'Srinuvasan Arjunan' via isar-users
@ 2026-09-11 11:20     ` 'Jan Kiszka' via isar-users
  2026-09-16  7:44       ` Zhihang Wei
  0 siblings, 1 reply; 6+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-09-11 11:20 UTC (permalink / raw)
  To: Srinuvasan Arjunan, isar-users

On 11.09.26 13:12, 'Srinuvasan Arjunan' via isar-users wrote:
> 
> 
> On Friday, September 11, 2026 at 4:19:31 PM UTC+5:30 Jan Kiszka wrote:
> 
>     On 11.09.26 12:16, srinuvasan.a via isar-users wrote:
>     > From: Srinuvasan A <srinuv...@siemens.com>
>     >
>     > ROOTFS_MOUNTS inner paths are absolute, e.g. /isar-apt and
>     > /isar-work. insert_isar_umounts added another slash between ROOTFSDIR
>     > and the inner path, producing paths like rootfs//isar-apt in the
>     > expanded rootfs_do_umounts_priv task.
>     >
>     > Strip the leading slash from the inner mount path when building the
>     > mountpoint, matching the logic already used by insert_isar_mounts.
>     >
>     > Logs:
>     > mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-
>     base-qemuamd64/1.0-r0/rootfs//isar-apt &&
>     > umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-
>     qemuamd64/1.0-r0/rootfs//isar-apt
>     >
>     > mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-
>     base-qemuamd64/1.0-r0/rootfs//isar-work &&
>     > umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-
>     qemuamd64/1.0-r0/rootfs//isar-work
>     >
>     > Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
>     > ---
>     > meta/classes-global/base.bbclass | 2 +-
>     > 1 file changed, 1 insertion(+), 1 deletion(-)
>     >
>     > diff --git a/meta/classes-global/base.bbclass b/meta/classes-
>     global/base.bbclass
>     > index 8f81ab70..be663fe7 100644
>     > --- a/meta/classes-global/base.bbclass
>     > +++ b/meta/classes-global/base.bbclass
>     > @@ -432,7 +432,7 @@ def insert_isar_umounts(d, rootfs, mounts):
>     >
>     > for m in mounts.split():
>     > host, inner = m.split(':') if ':' in m else (m, m)
>     > - mp = '{}/{}'.format(rootfs, inner)
>     > + mp = '{}/{}'.format(rootfs, inner[1:])
> 
>     This looks fragile. Why not strip off '/', rather than blindly cutting
>     the last char?
> 
>     Jan
> 
> 
>   Thanks for the comments,
> 
>   Here, inner[1:] strips the leading /, as we always assume the paths in
> ROOTFS_MOUNTS are absolute.

Yeah, confused that.

> 
>   For example:
> 
>   ROOTFS_MOUNTS ??= "${REPO_ISAR_DIR}/${DISTRO}:/isar-apt ${WORKDIR}:/
> isar-work"
> 
>   This also follows the same pattern already used by insert_isar_mounts.
> 

It would still be clearer, not requiring a (missing) comment or reading
the commit message to understand what is cut off here. And maybe other
code would benefit from a clearer pattern as well.

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/4e75a9db-b230-41a5-93d1-69a85f5568c0%40siemens.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] avoid double slash in generated rootfs umount paths
  2026-09-11 11:20     ` 'Jan Kiszka' via isar-users
@ 2026-09-16  7:44       ` Zhihang Wei
  0 siblings, 0 replies; 6+ messages in thread
From: Zhihang Wei @ 2026-09-16  7:44 UTC (permalink / raw)
  To: Srinuvasan Arjunan, isar-users; +Cc: Jan Kiszka



On 9/11/26 13:20, 'Jan Kiszka' via isar-users wrote:
> On 11.09.26 13:12, 'Srinuvasan Arjunan' via isar-users wrote:
>>
>> On Friday, September 11, 2026 at 4:19:31 PM UTC+5:30 Jan Kiszka wrote:
>>
>>      On 11.09.26 12:16, srinuvasan.a via isar-users wrote:
>>      > From: Srinuvasan A <srinuv...@siemens.com>
>>      >
>>      > ROOTFS_MOUNTS inner paths are absolute, e.g. /isar-apt and
>>      > /isar-work. insert_isar_umounts added another slash between ROOTFSDIR
>>      > and the inner path, producing paths like rootfs//isar-apt in the
>>      > expanded rootfs_do_umounts_priv task.
>>      >
>>      > Strip the leading slash from the inner mount path when building the
>>      > mountpoint, matching the logic already used by insert_isar_mounts.
>>      >
>>      > Logs:
>>      > mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-
>>      base-qemuamd64/1.0-r0/rootfs//isar-apt &&
>>      > umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-
>>      qemuamd64/1.0-r0/rootfs//isar-apt
>>      >
>>      > mountpoint -q /work/build/tmp/work/debian-trixie-amd64/isar-image-
>>      base-qemuamd64/1.0-r0/rootfs//isar-work &&
>>      > umount /work/build/tmp/work/debian-trixie-amd64/isar-image-base-
>>      qemuamd64/1.0-r0/rootfs//isar-work
>>      >
>>      > Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
>>      > ---
>>      > meta/classes-global/base.bbclass | 2 +-
>>      > 1 file changed, 1 insertion(+), 1 deletion(-)
>>      >
>>      > diff --git a/meta/classes-global/base.bbclass b/meta/classes-
>>      global/base.bbclass
>>      > index 8f81ab70..be663fe7 100644
>>      > --- a/meta/classes-global/base.bbclass
>>      > +++ b/meta/classes-global/base.bbclass
>>      > @@ -432,7 +432,7 @@ def insert_isar_umounts(d, rootfs, mounts):
>>      >
>>      > for m in mounts.split():
>>      > host, inner = m.split(':') if ':' in m else (m, m)
>>      > - mp = '{}/{}'.format(rootfs, inner)
>>      > + mp = '{}/{}'.format(rootfs, inner[1:])
>>
>>      This looks fragile. Why not strip off '/', rather than blindly cutting
>>      the last char?
>>
>>      Jan
>>
>>
>>    Thanks for the comments,
>>
>>    Here, inner[1:] strips the leading /, as we always assume the paths in
>> ROOTFS_MOUNTS are absolute.
> Yeah, confused that.
>
>>    For example:
>>
>>    ROOTFS_MOUNTS ??= "${REPO_ISAR_DIR}/${DISTRO}:/isar-apt ${WORKDIR}:/
>> isar-work"
>>
>>    This also follows the same pattern already used by insert_isar_mounts.
>>
> It would still be clearer, not requiring a (missing) comment or reading
> the commit message to understand what is cut off here. And maybe other
> code would benefit from a clearer pattern as well.
>
> Jan
>

Will there be a v2?

Zhihang

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/7bda14aa-6f21-452f-9496-1f5a2acee60e%40ilbers.de.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-16  7:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 10:16 [PATCH] avoid double slash in generated rootfs umount paths srinuvasan.a via isar-users
2026-09-11 10:41 ` 'MOESSBAUER, Felix' via isar-users
2026-09-11 10:49 ` 'Jan Kiszka' via isar-users
2026-09-11 11:12   ` 'Srinuvasan Arjunan' via isar-users
2026-09-11 11:20     ` 'Jan Kiszka' via isar-users
2026-09-16  7:44       ` Zhihang Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox