@@ -235,3 +235,13 @@ def base_set_filespath(path, d):
if p != "":
filespath.append(os.path.join(p, o))
return ":".join(filespath)
+
+def aggregate_files(d, file_list, file_out):
+ import shutil
+
+ with open(file_out, "wb") as out_fd:
+ for entry in file_list:
+ entry_real = bb.parse.resolve_file(entry, d)
+ with open(entry_real, "rb") as in_fd:
+ shutil.copyfileobj(in_fd, out_fd, 1024*1024*10)
+ out_fd.write("\n".encode())
@@ -68,16 +68,6 @@ python () {
d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
}
-def aggregate_files(d, file_list, file_out):
- import shutil
-
- with open(file_out, "wb") as out_fd:
- for entry in file_list:
- entry_real = bb.parse.resolve_file(entry, d)
- with open(entry_real, "rb") as in_fd:
- shutil.copyfileobj(in_fd, out_fd, 1024*1024*10)
- out_fd.write("\n".encode())
-
def parse_aptsources_list_line(source_list_line):
import re
This API is generic and can be used to aggregate any set of files. This can be reused for building buildchroot preferences file in future. Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com> --- meta/classes/base.bbclass | 10 ++++++++++ meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-)