Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] package.bbclass: fix spurious 'installed but not shipped' warning
@ 2011-09-16 15:28 Tom Zanussi
  2011-09-16 15:46 ` Otavio Salvador
  2011-09-16 16:24 ` Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Zanussi @ 2011-09-16 15:28 UTC (permalink / raw)
  To: openembedded-core

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>
---
 meta/classes/package.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 73e8f63..3dbe308 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -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)
 
-- 
1.7.0.4






^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-16 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-16 15:28 [PATCH] package.bbclass: fix spurious 'installed but not shipped' warning Tom Zanussi
2011-09-16 15:46 ` Otavio Salvador
2011-09-16 16:24 ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox