From f29f9364a3f14203d5883a9e95f38afa5926249f Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Mon, 23 Aug 2010 09:12:54 -0700 Subject: package.bbclass: Fix per-file dependency generation 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 --- meta/classes/package.bbclass | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 8d22d0fa8f..9ae7ecca0c 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -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(): -- cgit v1.2.3