diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index ffe3b312ff..d90976b65d 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -1004,8 +1004,9 @@ python do_package_rpm () { | |||
1004 | 1004 | ||
1005 | # Construct per file dependencies file | 1005 | # Construct per file dependencies file |
1006 | def dump_filerdeps(varname, outfile, d): | 1006 | def dump_filerdeps(varname, outfile, d): |
1007 | outfile.write("#!/bin/sh\n") | 1007 | outfile.write("#!/usr/bin/env python\n\n") |
1008 | outfile.write("\n# Dependency table\n") | 1008 | outfile.write("# Dependency table\n") |
1009 | outfile.write('deps = {\n') | ||
1009 | for pkg in packages.split(): | 1010 | for pkg in packages.split(): |
1010 | dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg | 1011 | dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg |
1011 | dependsflist = (d.getVar(dependsflist_key, True) or "") | 1012 | dependsflist = (d.getVar(dependsflist_key, True) or "") |
@@ -1018,7 +1019,7 @@ python do_package_rpm () { | |||
1018 | file = file.replace("@tab@", "\t") | 1019 | file = file.replace("@tab@", "\t") |
1019 | file = file.replace("@space@", " ") | 1020 | file = file.replace("@space@", " ") |
1020 | file = file.replace("@at@", "@") | 1021 | file = file.replace("@at@", "@") |
1021 | outfile.write("#" + pkgd + file + "\t") | 1022 | outfile.write('"' + pkgd + file + '" : "') |
1022 | for dep in depends_dict: | 1023 | for dep in depends_dict: |
1023 | ver = depends_dict[dep] | 1024 | ver = depends_dict[dep] |
1024 | if dep and ver: | 1025 | if dep and ver: |
@@ -1027,12 +1028,15 @@ python do_package_rpm () { | |||
1027 | outfile.write(dep + " " + ver + " ") | 1028 | outfile.write(dep + " " + ver + " ") |
1028 | else: | 1029 | else: |
1029 | outfile.write(dep + " ") | 1030 | outfile.write(dep + " ") |
1030 | outfile.write("\n") | 1031 | outfile.write('",\n') |
1031 | outfile.write("\n\nwhile read file_name ; do\n") | 1032 | outfile.write('}\n\n') |
1032 | outfile.write("\tlength=$(echo \"#${file_name}\t\" | wc -c )\n") | 1033 | outfile.write("import sys\n") |
1033 | outfile.write("\tline=$(grep \"^#${file_name}\t\" $0 | cut -c ${length}- )\n") | 1034 | outfile.write("while 1:\n") |
1034 | outfile.write("\tprintf \"%s\\n\" ${line}\n") | 1035 | outfile.write("\tline = sys.stdin.readline().strip()\n") |
1035 | outfile.write("done\n") | 1036 | outfile.write("\tif not line:\n") |
1037 | outfile.write("\t\tsys.exit(0)\n") | ||
1038 | outfile.write("\tif line in deps:\n") | ||
1039 | outfile.write("\t\tprint(deps[line] + '\\n')\n") | ||
1036 | 1040 | ||
1037 | # OE-core dependencies a.k.a. RPM requires | 1041 | # OE-core dependencies a.k.a. RPM requires |
1038 | outdepends = workdir + "/" + srcname + ".requires" | 1042 | outdepends = workdir + "/" + srcname + ".requires" |