[oe] glibc-package.bbclass: [ -f ] doesn't take multiple arguments

Leon Woestenberg leon.woestenberg at gmail.com
Thu Aug 23 20:22:26 UTC 2007


Philipp,

On 8/23/07, pHilipp Zabel <philipp.zabel at gmail.com> wrote:
> The "[ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]" fails if there
> are multiple libgcc_s.* in that directory (libgcc_s.so and
> libgcc_s.so.x.y)
>
> --- packages/glibc/glibc-package.bbclass        2529c6468fce1e1b9ff4d39758addca2534e19fb
> +++ packages/glibc/glibc-package.bbclass        7f658a24e4779696422ea29792ed63083a5985b8
> @@ -144,9 +144,12 @@ do_prep_locale_tree() {
>                 gunzip $i
>         done
>         ls ${D}/lib/* | xargs -iBLAH cp -a BLAH $treedir/lib
> -       if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then
> -               cp -a ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
> +       if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
> +               cp -a ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib

I understand the condition fix, but are you sure the cp action should
not have a wildcard??

Now, if multiple files exist, only one is copied.

Regards,

Leon.




More information about the Openembedded-devel mailing list