Skip to contentSkip to conversation

trouble with cp command in autotools.bbclass

DISCUSSION Robert Schuster 2 participants 3 messages Apr 1, 2008 – Apr 2, 2008

lore
Share & tools
lore
#0 lore raw

Hi,
lately the following copy operation has been added to autotools.bbclass:

# Otherwise libtool wasn't used, and lib/ can be copied

# directly.
echo "cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}"
cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}

I have trouble with this and a package that creates an empty ${libdir}. Shell globbing (*) wont find a file and instead tries to copy a file named "*" ... and fails and so does my built.

I would like to replace this with the following lines which uses find and is more robust:

# (The find command handles an empty ${STAGE_TEMP/${libdir} correctly) echo "find ${STAGE_TEMP}/${libdir} -mindepth 1 -maxdepth 1 -exec cp -fpPR {} ${STAGING_LIBDIR}" \;

find ${STAGE_TEMP}/${libdir} -mindepth 1 -maxdepth 1 -exec cp -fpPR {} ${STAGING_LIBDIR} \;

Ok for commit?

Regards
Robert

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Schuster schreef:

| Hi,
| lately the following copy operation has been added to autotools.bbclass:
|
| # Otherwise libtool wasn't used, and lib/ can be copied
| # directly.
| echo "cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}"
| cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}
|
| I have trouble with this and a package that creates an empty ${libdir}.
| Shell globbing (*) wont find a file and instead tries to copy a file
| named "*" ... and fails and so does my built.
|
| I would like to replace this with the following lines which uses find
| and is more robust:
|
| # (The find command handles an empty ${STAGE_TEMP/${libdir} correctly)
| echo "find ${STAGE_TEMP}/${libdir} -mindepth 1 -maxdepth 1 -exec cp
| -fpPR {} ${STAGING_LIBDIR}" \;
|
| find ${STAGE_TEMP}/${libdir} -mindepth 1 -maxdepth 1 -exec cp -fpPR {}
| ${STAGING_LIBDIR} \;
|
| Ok for commit?

or use:

autotools_stage_dir ${STAGE_TEMP}/${libdir} ${STAGING_LIBDIR}

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFH8dqdMkyGM64RGpERAuRsAKCZscg8u3San7ui3qkZfjJPwOWvPACgp7oF Qzjxe69KN+cq/BayJRi1/Ic=
=iHP3
-----END PGP SIGNATURE-----

#2 lore raw

Hi.

Quoted 10 lines · Koen Kooi

Robert Schuster schreef:

| # (The find command handles an empty ${STAGE_TEMP/${libdir} correctly)
| echo "find ${STAGE_TEMP}/${libdir} -mindepth 1 -maxdepth 1 -exec cp
| -fpPR {} ${STAGING_LIBDIR}" \;
|
| find ${STAGE_TEMP}/${libdir} -mindepth 1 -maxdepth 1 -exec cp -fpPR {}
| ${STAGING_LIBDIR} \;
|
| Ok for commit?
Quoted 3 lines

or use:

autotools_stage_dir ${STAGE_TEMP}/${libdir} ${STAGING_LIBDIR}

Looks better, indeed.

I committed it this way.

Regards
Robert
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel