> what is your defautl shell, is it bash or dash ?

I use bash

> what happens if you use single quotes around $@

I made this change:
diff --git a/poky/meta/classes-recipe/image_types.bbclass 
b/poky/meta/classes-recipe/image_types.bbclass
index 87d6effc6c..2dfe1cd51a 100644
--- a/poky/meta/classes-recipe/image_types.bbclass
+++ b/poky/meta/classes-recipe/image_types.bbclass
@@ -113,7 +113,7 @@ IMAGE_CMD:btrfs () {
oe_mksquashfs () {
local comp=$1; shift
-    local extra_imagecmd="$@"
+    local extra_imagecmd='$@'
if [ "$comp" = "zstd" ]; then
suffix="zst"

and got this result:
| DEBUG: Executing shell function do_image_squashfs_xz
| mksquashfs: invalid option
|
| SYNTAX:mksquashfs source1 source2 ...  FILESYSTEM [OPTIONS] [-e list of
| exclude dirs/files]
....

>> Shouldn’t there be a leading space, given that you use “append”?
>
> Yes, unless that isn’t a direct copy-and-paste, this is almost certainly from 
> a missing leading whitespace causing sh parsing to fail in interesting ways.

I made this change:
diff --git a/poky/meta/classes-recipe/image_types.bbclass 
b/poky/meta/classes-recipe/image_types.bbclass
index 87d6effc6c..14128a023e 100644
--- a/poky/meta/classes-recipe/image_types.bbclass
+++ b/poky/meta/classes-recipe/image_types.bbclass
@@ -112,6 +112,8 @@ IMAGE_CMD:btrfs () {
}
oe_mksquashfs () {
+    echo "oe_mksquashfs params:"
+    echo "$@"
local comp=$1; shift
local extra_imagecmd="$@"

With
EXTRA_IMAGECMD:squashfs-xz:append = "-processors 64 -b 262144 -Xdict-size 100% 
-Xbcj arm"
I get
| DEBUG: Executing shell function do_image_squashfs_xz
| oe_mksquashfs params:
| xz -processors 64 -b 262144 -Xdict-size 100% -Xbcj arm
| WARNING: exit code 2 from a shell command.
| 
/home/jmbills/upstream-sync/openbmc-openbmc/build/tmp/work/intel_ast2600-openbmc-linux-gnueabi/intel-platforms/1.0/temp/run.do_image_squashfs_xz.37111:
 159: local: 64: bad variable name
ERROR: Task 
(/home/jmbills/upstream-sync/openbmc-openbmc/openbmc-meta-intel/meta-common/recipes-intel/images/intel-platforms.bb:do_image_squashfs_xz)
 failed with exit code '1'

With
EXTRA_IMAGECMD:squashfs-xz:append = " -processors 64 -b 262144 -Xdict-size 100% 
-Xbcj arm"
I get
| DEBUG: Executing shell function do_image_squashfs_xz
| oe_mksquashfs params:
| xz -processors 64 -b 262144 -Xdict-size 100% -Xbcj arm
| WARNING: exit code 2 from a shell command.
| 
/home/jmbills/upstream-sync/openbmc-openbmc/build/tmp/work/intel_ast2600-openbmc-linux-gnueabi/intel-platforms/1.0/temp/run.do_image_squashfs_xz.37665:
 159: local: 64: bad variable name
ERROR: Task 
(/home/jmbills/upstream-sync/openbmc-openbmc/openbmc-meta-intel/meta-common/recipes-intel/images/intel-platforms.bb:do_image_squashfs_xz)
 failed with exit code '1'

Thanks again for all your help!
-Jason
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64585): https://lists.yoctoproject.org/g/yocto/message/64585
Mute This Topic: https://lists.yoctoproject.org/mt/110653777/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to