package.bbclass: Add sanity check for duplicates in PACKAGES (bug 674)
authorRichard Purdie <rpurdie@rpsys.net>
Sat, 29 Apr 2006 22:46:53 +0000 (22:46 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sat, 29 Apr 2006 22:46:53 +0000 (22:46 +0000)
classes/package.bbclass

index d32cf53..97e091c 100644 (file)
@@ -241,6 +241,14 @@ python populate_packages () {
                        return 0
                return (s[stat.ST_MODE] & stat.S_IEXEC)
 
+       # Sanity check PACKAGES for duplicates - should be moved to 
+       # sanity.bbclass once we have he infrastucture
+       pkgs = []
+       for pkg in packages.split():
+               if pkg in pkgs:
+                       bb.error("%s is listed in PACKAGES mutliple times. Undefined behaviour will result." % pkg)
+               pkgs += pkg
+
        for pkg in packages.split():
                localdata = bb.data.createCopy(d)
                root = os.path.join(workdir, "install", pkg)