[oe-commits] [openembedded-core] 07/11: prelink: Change the behavior to avoid checking USER_CLASSES

git at git.openembedded.org git at git.openembedded.org
Fri Aug 18 22:57:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d70c4db869dcad0efbe2e3a2b3a8ca6f0918889a
Author: Mark Hatle <mark.hatle at windriver.com>
AuthorDate: Fri Aug 18 14:12:33 2017 -0500

    prelink: Change the behavior to avoid checking USER_CLASSES
    
    The behavior before this change was to check USER_CLASSES and adjust
    the install script to return either exit 0 (don't do anything) or
    exit 1 (run on first boot).  This enabled a user to include the prelink
    package without enablign the image-prelink bbclass and get a first boot
    prelink.
    
    Checking USER_CLASSES is not desired, as an image should be able to simply
    inherit the image-prelink and get the same type of behavior.  Modifying
    the recipe based on the inclusion of a class is a bad idea as it makes
    this style work more difficult.  So we move to a more defined strategy
    based on exist uses.  (That we know of...)
    
    If we ae doing a cross install, we want to avoid prelinking.
    Prelinking during a cross install should be handled by the image-prelink
    bbclass.  If the user desires this to run on the target at first boot
    they will need to create a custom boot script.
    
    [YOCTO #11169]
    
    Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/prelink/prelink_git.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 4529dbf..b739af0 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -150,13 +150,15 @@ do_install_append () {
 	install -m 0644 ${WORKDIR}/macros.prelink ${D}${sysconfdir}/rpm/macros.prelink
 }
 
-# If we're using image-prelink, we want to skip this on the host side
-# but still do it if the package is installed on the target...
+# If we ae doing a cross install, we want to avoid prelinking.
+# Prelinking during a cross install should be handled by the image-prelink
+# bbclass.  If the user desires this to run on the target at first boot
+# they will need to create a custom boot script.
 pkg_postinst_prelink() {
 #!/bin/sh
 
 if [ "x$D" != "x" ]; then
-  ${@bb.utils.contains('USER_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)}
+  exit 0
 fi
 
 prelink -a

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list