public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [OE-core] [PATCH] classes/kernel.bbclass: allow disabling symlink creation also for pkg_postinst
@ 2022-05-11 16:05 Jonas Höppner
  2022-05-12  8:08 ` Luca Ceresoli
  0 siblings, 1 reply; 2+ messages in thread
From: Jonas Höppner @ 2022-05-11 16:05 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

The commit d7341f1f22c32ff6cc95d7127f26f87d7fc9c6bd has introduced a
variable to disable the symlink creation for kernel images.
kernel.bbclass contains code to generate a pkg_posinst step for the
kernel-image package which will generate a symlink after installation
on target/during rootfs creation. This part didn't checked the
KERNEL_IMAGETYPE_SYMLINK variable.


This patch adds this check, so that it is possible to disable this
symlink also.


Signed-off-by: Jonas Höppner <jonas.hoeppner@garz-fricke.com>
---
 meta/classes/kernel.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 8299b394a7..87e0970f00 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -93,6 +93,7 @@ python __anonymous () {
 
     kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel"
     imagedest = d.getVar('KERNEL_IMAGEDEST')
+    kernel_imagetype_symlink = d.getVar('KERNEL_IMAGETYPE_SYMLINK')
 
     for type in types.split():
         if bb.data.inherits_class('nopackages', d):
@@ -110,7 +111,8 @@ python __anonymous () {
 
         d.setVar('PKG:%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
         d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1')
-        d.setVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
+        if kernel_imagetype_symlink == 1:
+            d.setVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
 if [ -n "$D" ]; then
     ln -sf %s-${KERNEL_VERSION} $D/${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
 else
@@ -122,7 +124,7 @@ else
 fi
 set -e
 """ % (type, type, type, type, type, type, type))
-        d.setVar('pkg_postrm:%s-image-%s' % (kname,typelower), """set +e
+            d.setVar('pkg_postrm:%s-image-%s' % (kname,typelower), """set +e
 if [ -f "${KERNEL_IMAGEDEST}/%s" -o -L "${KERNEL_IMAGEDEST}/%s" ]; then
     rm -f ${KERNEL_IMAGEDEST}/%s  > /dev/null 2>&1
 fi




   
     


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] [PATCH] classes/kernel.bbclass: allow disabling symlink creation also for pkg_postinst
  2022-05-11 16:05 [OE-core] [PATCH] classes/kernel.bbclass: allow disabling symlink creation also for pkg_postinst Jonas Höppner
@ 2022-05-12  8:08 ` Luca Ceresoli
  0 siblings, 0 replies; 2+ messages in thread
From: Luca Ceresoli @ 2022-05-12  8:08 UTC (permalink / raw)
  To: Jonas via lists.openembedded.org
  Cc: jonas.hoeppner, openembedded-core@lists.openembedded.org

Hi Jonas,

Il giorno Wed, 11 May 2022 16:05:39 +0000
"Jonas via lists.openembedded.org"
<jonas.hoeppner=garz-fricke.com@lists.openembedded.org> ha scritto:

> The commit d7341f1f22c32ff6cc95d7127f26f87d7fc9c6bd has introduced a
> variable to disable the symlink creation for kernel images.
> kernel.bbclass contains code to generate a pkg_posinst step for the
> kernel-image package which will generate a symlink after installation
> on target/during rootfs creation. This part didn't checked the
> KERNEL_IMAGETYPE_SYMLINK variable.
> 
> 
> This patch adds this check, so that it is possible to disable this
> symlink also.
> 
> 
> Signed-off-by: Jonas Höppner <jonas.hoeppner@garz-fricke.com>

This patch does not apply, apparently because it is not properly
text-encoded. Did you use git send-email to send it?

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-12  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 16:05 [OE-core] [PATCH] classes/kernel.bbclass: allow disabling symlink creation also for pkg_postinst Jonas Höppner
2022-05-12  8:08 ` Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox