Skip to contentSkip to conversation

rootfs.py: Check for LDCONFIGDEPEND being empty string

PATCH In review Khem Raj 2 participants 2 messages Feb 15, 2014 – Feb 16, 2014

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 rootfs.py: Check for LDCONFIGDEPEND being empty string

We override LDCONFIGDEPEND to be empty string for uclibc however the current check is for it being None as a result the function is still executed but ldconfig-native is not built as dependency for rootfs when building with uclibc

Fixes errors like below

File:
'/home/kraj/work/angstrom-repo/sources/openembedded-core/meta/lib/oe/rootfs.py',
lineno: 191, function: _run_ldconfig
0187: def _run_ldconfig(self):
0188: if self.d.getVar('LDCONFIGDEPEND', True) is not None:
0189: bb.note("Executing: ldconfig -r" +
self.image_rootfs + "-c new -v")

     0190:            self._exec_shell_cmd(['ldconfig', '-r',

self.image_rootfs, '-c',
*** 0191: 'new', '-v'])

---
 meta/lib/oe/rootfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/rootfs.py +1 -1
index 6114f56..285c769 100644
@@ -185,7 +185,7 @@ class Rootfs(object):
                         self._handle_intercept_failure(registered_pkgs)
 
     def _run_ldconfig(self):
-        if self.d.getVar('LDCONFIGDEPEND', True) is not None:
+        if self.d.getVar('LDCONFIGDEPEND', True) != "":
             bb.note("Executing: ldconfig -r" + self.image_rootfs + "-c new -v")
             self._exec_shell_cmd(['ldconfig', '-r', self.image_rootfs, '-c',
                                   'new', '-v'])
Signature · 1 line
1.8.5.5
#1 lore raw
Quoted 10 lines · Khem Raj

We override LDCONFIGDEPEND to be empty string for uclibc however the current check is for it being None as a result the function is still executed but ldconfig-native is not built as dependency for rootfs when building with uclibc

Fixes errors like below

File:

'/home/kraj/work/angstrom-repo/sources/openembedded-core/meta/lib/oe/rootfs.py',

Quoted 19 lines

lineno: 191, function: _run_ldconfig
0187: def _run_ldconfig(self):
0188: if self.d.getVar('LDCONFIGDEPEND', True) is not None:
0189: bb.note("Executing: ldconfig -r" +
self.image_rootfs + "-c new -v")

     0190:            self._exec_shell_cmd(['ldconfig', '-r',

self.image_rootfs, '-c',
*** 0191: 'new', '-v'])

---
 meta/lib/oe/rootfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/rootfs.py +0 -0
index 6114f56..285c769 100644

meta/lib/oe/rootfs.py class Rootfs(object): · line 188

Quoted 5 lines
meta/lib/oe/rootfs.py +1 -1
@@ -185,7 +185,7 @@ class Rootfs(object):
                         self._handle_intercept_failure(registered_pkgs)
 
     def _run_ldconfig(self):
-        if self.d.getVar('LDCONFIGDEPEND', True) is not None:
+        if self.d.getVar('LDCONFIGDEPEND', True) != "":

Why not just
if self.d.getVar('LDCONFIGDEPEND', True):

That ought to DTRT for all content evaluating to false. Thanks,