]> code.ossystems Code Review - meta-freescale.git/commitdiff
management-complex: avoid soft link loop in do_deploy
authorTing Liu <ting.liu@nxp.com>
Fri, 12 Jun 2020 11:38:41 +0000 (19:38 +0800)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 16 Jun 2020 11:46:19 +0000 (08:46 -0300)
when the deploy mc_app directory is already populated, a soft link
loop from mc.itb to mc.itb will be created.

Steps to reproduce:
$ bitbake -c cleansstate management-complex
$ bitbake management-complex
$ bitbake -c deploy -f management-complex

Use 'find -type f' to exclude links.

Signed-off-by: Ting Liu <ting.liu@nxp.com>
recipes-dpaa2/management-complex/management-complex_10.14.1.bb
recipes-dpaa2/management-complex/management-complex_10.20.4.bb

index 52da410ed0da041cbeeba997469936f5c3e03c62..ddb305c1a36c88be050eeeac19e205b7b3bc1551 100644 (file)
@@ -25,7 +25,7 @@ do_deploy () {
     install -d ${DEPLOYDIR}/mc_app
     install -m 755 ${S}/${REGLEX}/*.itb ${DEPLOYDIR}/mc_app
     # make a symlink to the latest binary
-    for mc_binary in `ls ${DEPLOYDIR}/mc_app |sort`;do
+    for mc_binary in `find ${DEPLOYDIR}/mc_app -type f -printf "%f\n" |sort`;do
         ln -sfT ${mc_binary} ${DEPLOYDIR}/mc_app/mc.itb
     done
 }
index a687657c554f218affb7bccf7a20e80a770cf0de..3e14a26eabeb5d8511bb6926e3f60cb9211f2a9d 100644 (file)
@@ -25,7 +25,7 @@ do_deploy () {
     install -d ${DEPLOYDIR}/mc_app
     install -m 755 ${S}/${REGLEX}/*.itb ${DEPLOYDIR}/mc_app
     # make a symlink to the latest binary
-    for mc_binary in `ls ${DEPLOYDIR}/mc_app |sort`;do
+    for mc_binary in `find ${DEPLOYDIR}/mc_app -type f -printf "%f\n" |sort`;do
         ln -sfT ${mc_binary} ${DEPLOYDIR}/mc_app/mc.itb
     done
 }