[oe-commits] [openembedded-core] 12/15: lib/oe/rootfs: prelink only when image-prelink is inherited

git at git.openembedded.org git at git.openembedded.org
Tue Feb 5 18:30:40 UTC 2019


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 17a83f3de3ff22ce251dfcff31551fcded85dd9b
Author: Andrej Valek <andrej.valek at siemens.com>
AuthorDate: Tue Feb 5 09:54:25 2019 +0100

    lib/oe/rootfs: prelink only when image-prelink is inherited
    
    Use prelink only when image-prelink class is inherited. Inheriting this
    class adds prelink-native as dependency to do_rootfs, which makes prelink
    binary and configuration available.
    
    |Exception: FileNotFoundError: [Errno 2] No such file or directory:
    |'/home/.../1.0-r0/recipe-sysroot-native/etc/prelink.conf'
    |
    | if not os.path.exists(prelink_cfg):
    |     shutil.copy(self.d.expand('${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf'),prelink_cfg)
    
    Signed-off-by: Andrej Valek <andrej.valek at siemens.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/rootfs.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 551dcfc..ffbd143 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -747,15 +747,16 @@ class OpkgRootfs(DpkgOpkgRootfs):
         if filecmp.cmp(f1, f2):
             return True
 
-        if self.image_rootfs not in f1:
-            self._prelink_file(f1.replace(key, ''), f1)
+        if bb.data.inherits_class('image-prelink', self.d):
+            if self.image_rootfs not in f1:
+                self._prelink_file(f1.replace(key, ''), f1)
 
-        if self.image_rootfs not in f2:
-            self._prelink_file(f2.replace(key, ''), f2)
+            if self.image_rootfs not in f2:
+                self._prelink_file(f2.replace(key, ''), f2)
 
-        # Both of them are prelinked
-        if filecmp.cmp(f1, f2):
-            return True
+            # Both of them are prelinked
+            if filecmp.cmp(f1, f2):
+                return True
 
         # Not equal
         return False

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


More information about the Openembedded-commits mailing list