[OE-core] [PATCH 1/1] isoimage-isohybrid.py: fix cpio working directory
Ioan-Adrian Ratiu
adrian.ratiu at ni.com
Fri Feb 5 13:36:57 UTC 2016
Take `pwd` to be <initial-dir>. The %s path is relative to it. The value
of %s is "output_folder/build". The current code works as follows:
Changing directory to %s and finding the sources (after cd'ing) to cpio
with output redirection to %s/initrd.cpio triggers the following error
"Error: exec_cmd: cd output_folder/build/INITRD && find . | cpio -o -H
newc >output_folder/build/initrd.cpio returned '1' instead of 0"
This happens because after the cd, `pwd` is <initial-dir>/%s and by the
redirect we write the result to to <initial-dir>/%s/%s/initrd.cpio which
obviously does not exist.
Fix this by getting the sources with "find %s" instead of "cd && find ."
Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
---
scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 62385a2..31dc9b6 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -174,7 +174,7 @@ class IsoImagePlugin(SourcePlugin):
else:
msger.error("Couldn't find or build initrd, exiting.\n")
- exec_cmd("cd %s && find . | cpio -o -H newc >%s/initrd.cpio " \
+ exec_cmd("find %s | cpio -o -H newc >%s/initrd.cpio " \
% (initrd_dir, cr_workdir), as_shell=True)
exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \
% (cr_workdir, initrd), as_shell=True)
--
2.7.0
More information about the Openembedded-core
mailing list