summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mhatle@windriver.com>2010-08-23 09:12:54 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-23 20:52:45 +0100
commitf29f9364a3f14203d5883a9e95f38afa5926249f (patch)
tree76a86b4111df6f479fde374113ce10bda70eab8d /meta/classes
parente37ee511575ef628d1591c4231e37ee0b456a76f (diff)
downloadpoky-f29f9364a3f14203d5883a9e95f38afa5926249f.tar.gz
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 <mhatle@windriver.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass13
1 files 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() {
508 508
509 for pkg in packages.split(): 509 for pkg in packages.split():
510 subdata_file = pkgdatadir + "/runtime/%s" % pkg 510 subdata_file = pkgdatadir + "/runtime/%s" % pkg
511
511 sf = open(subdata_file, 'w') 512 sf = open(subdata_file, 'w')
512 write_if_exists(sf, pkg, 'PN') 513 write_if_exists(sf, pkg, 'PN')
513 write_if_exists(sf, pkg, 'PV') 514 write_if_exists(sf, pkg, 'PV')
@@ -580,22 +581,26 @@ python package_do_filedeps() {
580 def process_deps(pipe, pkg, varname): 581 def process_deps(pipe, pkg, varname):
581 dep_files = "" 582 dep_files = ""
582 for line in pipe: 583 for line in pipe:
583 key = ""; 584 key = ""
584 value = ""; 585 value = ""
585 # We expect two items on each line 586 # We expect two items on each line
586 # 1 - filepath 587 # 1 - filepath
587 # 2 - dep list 588 # 2 - dep list
588 line_list = line.split(None,1); 589 line_list = line.rstrip().split(None,1);
589 if len(line_list) <= 0 or len(line_list) > 2: 590 if len(line_list) <= 0 or len(line_list) > 2:
590 bb.error("deps list length error! " + len(line_list)); 591 bb.error("deps list length error! " + len(line_list));
591 if len(line_list) == 2: 592 if len(line_list) == 2:
592 file = line_list[0]; 593 file = line_list[0];
593 value = line_list[1] 594 value = line_list[1]
594 file = file.replace(pkgdest + "/" + pkg, "") 595 file = file.replace(pkgdest + "/" + pkg, "")
596 file = file.replace("@", "@at@")
597 file = file.replace("[", "@openbrace@")
598 file = file.replace("]", "@closebrace@")
599 file = file.replace("_", "@underscore@")
595 dep_files = dep_files + " " + file 600 dep_files = dep_files + " " + file
596 key = "FILE" + varname + "_" + file + "_" + pkg 601 key = "FILE" + varname + "_" + file + "_" + pkg
597 bb.data.setVar(key, value, d) 602 bb.data.setVar(key, value, d)
598 bb.data.setVar("FILE" + varname + "_" + pkg, dep_files, d) 603 bb.data.setVar("FILE" + varname + "FLIST_" + pkg, dep_files, d)
599 604
600 # Determine dependencies 605 # Determine dependencies
601 for pkg in packages.split(): 606 for pkg in packages.split():