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 <
vidyas...@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