]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: fix spurious 'installed but not shipped' warning
authorTom Zanussi <tom.zanussi@intel.com>
Fri, 16 Sep 2011 15:28:27 +0000 (10:28 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Sep 2011 16:23:41 +0000 (17:23 +0100)
For packages that have files installed that aren't in a subdirectory,
the following build WARNING is emitted (this for initramfs-live-boot
as an example):

WARNING: For recipe initramfs-live-boot, the following files were
 installed but not shipped in any package:
WARNING:   init

The problem is that the filenames added to the 'seen' array are always
added with a path separator at the beginning of the filename, but when
the package dir is walked for comparison, any files at the top-level
will be missing the beginning path separator and the comparison will
fail despite the fact that the file was actually packaged.  This
because the remainder between the dirname and the dvar base name is
used in the path join and in the case of files at the top-level, the
remainder is the empty string, where it should be '/' for comparison
purposes.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 73e8f6365f6d55801fd4800f37f40b88ee77168b..3dbe308d0ee6e91b5bbc0a9abfce9f4bc6b6871e 100644 (file)
@@ -936,8 +936,11 @@ python populate_packages () {
 
        unshipped = []
        for root, dirs, files in os.walk(dvar):
+               dir = root[len(dvar):]
+               if not dir:
+                       dir = os.sep
                for f in files:
-                       path = os.path.join(root[len(dvar):], f)
+                       path = os.path.join(dir, f)
                        if ('.' + path) not in seen:
                                unshipped.append(path)