distro-build-manifest: fix DIST_LAYERS due to new layout 19/21619/2
authorStephane Desneux <stephane.desneux@iot.bzh>
Thu, 13 Jun 2019 10:27:55 +0000 (10:27 +0000)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 17 Jun 2019 17:22:34 +0000 (17:22 +0000)
New layout with subfolders causes incomplete DIST_LAYERS to be generated
in deploy/images/.../build-info.

This patches fixes how git repos are found in the layers directory.

Bug-AGL: SPEC-2450

Change-Id: I4b6a62b68064de12119e668522242677e11c65eb
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
scripts/distro-manifest-generator.sh

index 834cde2..7552b99 100755 (executable)
@@ -155,7 +155,7 @@ function _getgitmanifest() {
 
        local gitrepo gitrev metagitdir sep=""
        DIST_LAYERS=""
-       for metagitdir in $(ls -d $DIST_METADIR/*/.git); do
+       for metagitdir in $(find $DIST_METADIR -type d -name ".git"); do
                gitrepo=$($REALPATH -Ls $metagitdir/.. --relative-to=$DIST_METADIR)
                pushd $DIST_METADIR/$gitrepo &>/dev/null && {
                        gitrev=$( { $GIT describe --long --dirty --always 2>/dev/null || echo "unknown_revision"; } | tr ' \t' '__' )