]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Fix per-file dependency generation
authorMark Hatle <mhatle@windriver.com>
Mon, 23 Aug 2010 16:12:54 +0000 (09:12 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 23 Aug 2010 19:52:45 +0000 (20:52 +0100)
The overall file list was being constructed with the wrong variable, it
should have had FLIST in the name.

Also it was possible to construct the system with some illegal variable
names.  Names that would have include "[]".  So translate these away...

Finally fix an issues where a filename with an _ could cause a package
variable conflict.  Again translate this away..

Signed-off-by: Mark Hatle <mhatle@windriver.com>
meta/classes/package.bbclass

index 8d22d0fa8fe2f6de20ae943d2cb10354655d482c..9ae7ecca0c4715d66a4ac6102cca86c270a9961b 100644 (file)
@@ -508,6 +508,7 @@ python emit_pkgdata() {
 
        for pkg in packages.split():
                subdata_file = pkgdatadir + "/runtime/%s" % pkg
+
                sf = open(subdata_file, 'w')
                write_if_exists(sf, pkg, 'PN')
                write_if_exists(sf, pkg, 'PV')
@@ -580,22 +581,26 @@ python package_do_filedeps() {
        def process_deps(pipe, pkg, varname):
                dep_files = ""
                for line in pipe:
-                       key = "";
-                       value = "";
+                       key = ""
+                       value = ""
                        # We expect two items on each line
                        # 1 - filepath
                        # 2 - dep list
-                       line_list = line.split(None,1);
+                       line_list = line.rstrip().split(None,1);
                        if len(line_list) <= 0 or len(line_list) > 2:
                                bb.error("deps list length error! " + len(line_list));
                        if len(line_list) == 2:
                                file = line_list[0];
                                value = line_list[1]
                                file = file.replace(pkgdest + "/" + pkg, "")
+                               file = file.replace("@", "@at@")
+                               file = file.replace("[", "@openbrace@")
+                               file = file.replace("]", "@closebrace@")
+                               file = file.replace("_", "@underscore@")
                                dep_files = dep_files + " " + file
                                key = "FILE" + varname + "_" + file + "_" + pkg
                                bb.data.setVar(key, value, d)
-               bb.data.setVar("FILE" + varname + "_" + pkg, dep_files, d)
+               bb.data.setVar("FILE" + varname + "FLIST_" + pkg, dep_files, d)
 
        # Determine dependencies
        for pkg in packages.split():