package.bbclass: Add warning about FILES containing '//'
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 May 2012 10:59:01 +0000 (11:59 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 May 2012 16:32:31 +0000 (17:32 +0100)
'//' in a FILES variable causes hard to track down issues with
packaging. This adds a warning and attempts to auto-correct the issue to
try and make the problem more user friendly.

[YOCTO #2448]

(From OE-Core rev: 0e33e314b1d2d3779658696f13a274b20d698667)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 41139ef..10c2f0a 100644 (file)
@@ -917,6 +917,9 @@ python populate_packages () {
                files = filesvar.split()
                file_links = {}
                for file in files:
+                       if file.find("//") != -1:
+                               bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg)
+                               file.replace("//", "/")
                        if os.path.isabs(file):
                                file = '.' + file
                        if not os.path.islink(file):