Skip to contentSkip to conversation

kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it

PATCH Applied Guillem Jover 2 participants 2 messages Sep 3, 2010 – Sep 6, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it

Avoid an error when doing cp over the image when it does not contain the full path to the file.

---
 scripts/package/builddeb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
scripts/package/builddeb +3 -1
index 5f1e2fc..49b74e1 100644
@@ -66,7 +66,9 @@ else
 	cp System.map "$tmpdir/boot/System.map-$version"
 	cp .config "$tmpdir/boot/config-$version"
 	# Not all arches include the boot path in KBUILD_IMAGE
-	if ! cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"; then
+	if [ -e $KBUILD_IMAGE ]; then
+		cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
+	else
 		cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
 	fi
 fi
Signature · 1 line
1.7.1
Applied
#1 lore raw
Quoted 7 lines · Guillem Jover

Avoid an error when doing cp over the image when it does not contain the full path to the file.

---
 scripts/package/builddeb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Thanks, applied.

Michal