Message ID | 20241127174426.4098-1-vidyasagar.gc@siemens.com |
---|---|
State | Accepted, archived |
Headers | show |
Series | Fix rootfs source list handling in image.bbclass | expand |
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.
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
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(-)