public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] Fix rootfs source list handling in image.bbclass
@ 2024-11-27 17:44 Vidyasagar G C
  2024-12-06  7:28 ` Uladzimir Bely
  0 siblings, 1 reply; 2+ messages in thread
From: Vidyasagar G C @ 2024-11-27 17:44 UTC (permalink / raw)
  To: isar-users; +Cc: Vidyasagar G C

Ensure that the APT sources list is only moved if both the sources-list
file and the sources.list.d directory exist. This prevents errors when
APT is not installed, as the sources.list.d directory will be missing.

Signed-off-by: Vidyasagar G C <vidyasagar.gc@siemens.com>
---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 472df3cf..31be4267 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -418,7 +418,7 @@ do_rootfs_finalize() {
                 -maxdepth 1 -name 'qemu-*-static' -type f -delete
         fi
 
-        if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then
+        if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ] && [ -e "${ROOTFSDIR}/etc/apt/sources-list.d" ]; then
             mv "${ROOTFSDIR}/etc/apt/sources-list" \
                 "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
         fi
-- 
2.39.2

-- 
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/20241127174426.4098-1-vidyasagar.gc%40siemens.com.

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

* Re: [PATCH] Fix rootfs source list handling in image.bbclass
  2024-11-27 17:44 [PATCH] Fix rootfs source list handling in image.bbclass Vidyasagar G C
@ 2024-12-06  7:28 ` Uladzimir Bely
  0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2024-12-06  7:28 UTC (permalink / raw)
  To: Vidyasagar G C, isar-users

On Wed, 2024-11-27 at 23:14 +0530, Vidyasagar G C wrote:
> Ensure that the APT sources list is only moved if both the sources-
> list
> file and the sources.list.d directory exist. This prevents errors
> when
> APT is not installed, as the sources.list.d directory will be
> missing.
> 
> Signed-off-by: Vidyasagar G C <vidyasagar.gc@siemens.com>
> ---
>  meta/classes/image.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 472df3cf..31be4267 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -418,7 +418,7 @@ do_rootfs_finalize() {
>                  -maxdepth 1 -name 'qemu-*-static' -type f -delete
>          fi
>  
> -        if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then
> +        if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ] && [ -e
> "${ROOTFSDIR}/etc/apt/sources-list.d" ]; then
>              mv "${ROOTFSDIR}/etc/apt/sources-list" \
>                  "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
>          fi
> -- 
> 2.39.2
> 

Applied to next, thanks.

-- 
Best regards,
Uladzimir.



-- 
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/cf2f482568ac61e43c47783c64d3371eca7fe953.camel%40ilbers.de.

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

end of thread, other threads:[~2024-12-06  7:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-27 17:44 [PATCH] Fix rootfs source list handling in image.bbclass Vidyasagar G C
2024-12-06  7:28 ` Uladzimir Bely

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