diff mbox series

[10/12] bringup: Use full path when creating custom_source file

Message ID 20241218-jag-bringup_fixes-v1-10-0bf2e07c640c@kernel.org (mailing list archive)
State New
Headers show
Series kdevops: Various fixes | expand

Commit Message

Joel Granados Dec. 18, 2024, 10:30 a.m. UTC
Avoid "file not found" failures related to relative paths in
custom_source

Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
 scripts/bringup_guestfs.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
index 74eecea..f49fd12 100755
--- a/scripts/bringup_guestfs.sh
+++ b/scripts/bringup_guestfs.sh
@@ -34,7 +34,7 @@  build_custom_source()
 	SOURCE_TMP=$(mktemp)
 	cat <<_EOT >$SOURCE_TMP
 [local]
-uri=file:///${CUSTOM_INDEX}
+uri=file:///${REAL_CUSTOM_INDEX}
 proxy=off
 _EOT
 	sudo mv $SOURCE_TMP $CUSTOM_SOURCE
@@ -111,6 +111,7 @@  build_custom_image()
 	CUSTOM_IMAGE_OK="${CUSTOM_IMAGE_DIR}.ok"
 	CUSTOM_SOURCE="/etc/virt-builder/repos.d/kdevops-custom-images-${OS_VERSION}.conf"
 	CUSTOM_INDEX="${CUSTOM_IMAGE_DIR}/index"
+	REAL_CUSTOM_INDEX="$(realpath $CUSTOM_INDEX)"
 
 	mkdir -p ${CUSTOM_IMAGE_DIR}