summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorIoan-Adrian Ratiu <adrian.ratiu@ni.com>2016-02-05 15:36:57 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-07 17:29:59 +0000
commiteb134c6ee6cab23ca01b699d3ca08b7ffd021cb2 (patch)
treef62fe4d992aff97a1ed84899df5464cb952543a9 /scripts/lib
parent8bedf767aa8fa9629dd126bdc649912cfe074f7f (diff)
downloadpoky-eb134c6ee6cab23ca01b699d3ca08b7ffd021cb2.tar.gz
isoimage-isohybrid.py: fix cpio working directory
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 ." (From OE-Core rev: 07fa4783566d22d46ce719a621eee5404932dbbe) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 62385a223d..31dc9b6ce6 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):
174 else: 174 else:
175 msger.error("Couldn't find or build initrd, exiting.\n") 175 msger.error("Couldn't find or build initrd, exiting.\n")
176 176
177 exec_cmd("cd %s && find . | cpio -o -H newc >%s/initrd.cpio " \ 177 exec_cmd("find %s | cpio -o -H newc >%s/initrd.cpio " \
178 % (initrd_dir, cr_workdir), as_shell=True) 178 % (initrd_dir, cr_workdir), as_shell=True)
179 exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \ 179 exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \
180 % (cr_workdir, initrd), as_shell=True) 180 % (cr_workdir, initrd), as_shell=True)