package: Keep global pkgfiles[] up to date when snapping library symlinks

Submitted by Phil Blundell on Jan. 10, 2014, 2:38 p.m. | Patch ID: 64531


Message ID 1389364712.9182.153.camel@phil-desktop.brightsign
State Accepted
Commit bdad58c51dfdda5253933c3e371a7d526cdbb67e
Headers show

Commit Message

Phil Blundell Jan. 10, 2014, 2:38 p.m.
Since ca86603607a69a17cc5540d69de0e242b33382d3 we are now calling stat() on
all the pkgfiles[] during emit_pkgdata().  If symlink snapping has removed
some of the files then we will blow up trying to stat a path that no longer
exists.  Fix that by ensuring that pkgfiles[] is updated when we process the 
list of library renames.

Signed-off-by: Phil Blundell <>
 meta/classes/package.bbclass | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 08b78db..726a84f 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1474,6 +1474,8 @@  python package_do_shlibs() {
         for (old, new) in renames:
             bb.note("Renaming %s to %s" % (old, new))
             os.rename(old, new)
+            pkgfiles[pkg].remove(old)
         shlibs_file = os.path.join(shlibswork_dir, pkg + ".list")
         shver_file = os.path.join(shlibswork_dir, pkg + ".ver")
         if len(sonames):