summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2012-04-11 12:55:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-11 12:57:17 +0100
commit00a6199b9288d2c1fec7cef4c13a820a1976c1d6 (patch)
tree0a09b5e334339463f14c08d28ee1d80c3523c0a0
parentf03d66bcc1fde80fd8923a400d2f2edfee576068 (diff)
downloadpoky-00a6199b9288d2c1fec7cef4c13a820a1976c1d6.tar.gz
poky-00a6199b9288d2c1fec7cef4c13a820a1976c1d6.tar.bz2
poky-00a6199b9288d2c1fec7cef4c13a820a1976c1d6.zip
"The suite of statements in a function definition executes with a local namespace that is different from the global namespace. This means that all variables created within a function are local to that function. When the suite finishes, these working variables are discarded."
In this way the needs_ldconfig variable in linux_so never gets True in the statements below this function. As global statement is generally discouraged, a return value would be a clean and fast way to solve this issue. [YOCTO #2205] RP: Added logic to ensure the value doesn't get overwritten once set (From OE-Core rev: 6d39af4f85220f20bad09b0fdd3ee0a7ec19c12d) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>--- Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d35667a91d..c3f077af3a 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1263,6 +1263,7 @@ python package_do_shlibs() {
lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
def linux_so(root, path, file):
+ needs_ldconfig = False
cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)
fd = os.popen(cmd)
@@ -1283,6 +1284,7 @@ python package_do_shlibs() {
needs_ldconfig = True
if snap_symlinks and (file != this_soname):
renames.append((os.path.join(root, file), os.path.join(root, this_soname)))
+ return needs_ldconfig
def darwin_so(root, path, file):
fullpath = os.path.join(root, file)
@@ -1382,7 +1384,8 @@ python package_do_shlibs() {
if targetos == "darwin" or targetos == "darwin8":
darwin_so(root, dirs, file)
elif os.access(path, os.X_OK) or lib_re.match(file):
- linux_so(root, dirs, file)
+ ldconfig = linux_so(root, dirs, file)
+ needs_ldconfig = needs_ldconfig or ldconfig
for (old, new) in renames:
bb.note("Renaming %s to %s" % (old, new))
os.rename(old, new)