]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
Revert "kernel: Fix symlinks"
authorAndreas Oberritter <obi@opendreambox.org>
Fri, 21 Apr 2017 10:34:00 +0000 (12:34 +0200)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 8 Apr 2019 11:49:57 +0000 (13:49 +0200)
This reverts commit c7bc46b9bc29dd0953ab8d63b50fa105bb66892e.

It broke dpkg's update-alternatives, which requires absolute paths.

| update-alternatives: error: alternative path is not absolute as it should be

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/classes/kernel.bbclass
meta/recipes-kernel/linux/linux-dtb.inc

index ce2cab65ae400b47742f8b596c91521646239af0..fc55f9e69f63c69eb7bc5390bdc451a27b8168bf 100644 (file)
@@ -53,11 +53,10 @@ python __anonymous () {
 
     for type in types.split():
         typelower = type.lower()
-        imagedest = d.getVar('KERNEL_IMAGEDEST')
 
         d.appendVar('PACKAGES', ' ' + 'kernel-image-' + typelower)
 
-        d.setVar('FILES_kernel-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}')
+        d.setVar('FILES_kernel-image-' + typelower, '/boot/' + type + '-${KERNEL_VERSION_NAME}')
 
         d.appendVar('RDEPENDS_kernel-image', ' ' + 'kernel-image-' + typelower)
 
@@ -65,8 +64,9 @@ python __anonymous () {
 
         d.setVar('ALLOW_EMPTY_kernel-image-' + typelower, '1')
 
+        imagedest = d.getVar('KERNEL_IMAGEDEST')
         priority = d.getVar('KERNEL_PRIORITY')
-        postinst = '#!/bin/sh\n' + 'update-alternatives --install /' + imagedest + '/' + type + ' ' + type + ' ' + type + '-${KERNEL_VERSION_NAME} ' + priority + ' || true' + '\n'
+        postinst = '#!/bin/sh\n' + 'update-alternatives --install /' + imagedest + '/' + type + ' ' + type + ' ' + '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME} ' + priority + ' || true' + '\n'
         d.setVar('pkg_postinst_kernel-image-' + typelower, postinst)
 
         postrm = '#!/bin/sh\n' + 'update-alternatives --remove' + ' ' + type + ' ' + type + '-${KERNEL_VERSION_NAME} || true' + '\n'
index 22e374fa88f8d8e62bf4376c85686889a00dc543..41aad7c309e6e16eea4b5c1a9d16e0ad3eeae3c2 100644 (file)
@@ -63,7 +63,7 @@ pkg_postinst_kernel-devicetree () {
                        DTB_EXT=${DTB##*.}
                        DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
                        DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-                       update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
+                       update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
                done
        done
 }
@@ -76,7 +76,7 @@ pkg_postrm_kernel-devicetree () {
                        DTB_EXT=${DTB##*.}
                        DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
                        DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-                       update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
+                       update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
                done
        done
 }