aglwgt.bbclass: remove pushd/popd usage 56/24056/1
authorScott Murray <scott.murray@konsulko.com>
Thu, 20 Feb 2020 22:45:05 +0000 (17:45 -0500)
committerScott Murray <scott.murray@konsulko.com>
Thu, 20 Feb 2020 22:45:05 +0000 (17:45 -0500)
The recent addition of multiple widget types in aglwgt.bbclass added
usage of pushd and popd, which are bash specific. This is undesirable,
since it causes failures for anyone trying to build on default installs
of Debian or Ubuntu. Since the B and S variables in OE recipes are
known to be absolute paths by definition, the pushd/popd can simply
be replaced with "cd".

Bug-AGL: SPEC-2049

Change-Id: I7ec9c558545be9aedd0b7e40539127b7f8c665ed
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
meta-app-framework/classes/aglwgt.bbclass

index 1ccdd76..d0f8055 100644 (file)
@@ -32,7 +32,7 @@ do_aglwgt_package()  {
     mkdir -p ${S}/build-debug
     mkdir -p ${S}/build-coverage
 
-    pushd ${B}
+    cd ${B}
     ${S}/autobuild/agl/autobuild package BUILD_DIR=${B} DEST=${S}/widgets VERBOSE=TRUE || \
     ( ${S}/conf.d/autobuild/agl/autobuild package BUILD_DIR=${B} DEST=${B}/package VERBOSE=TRUE && \
         ( bbwarn "OBSOLETE: Your autobuild script should be located in :" ; \
@@ -52,22 +52,18 @@ do_aglwgt_package()  {
         bbwarn "Fix your package as it will not work within the SDK" ; \
         bbwarn "See: https://wiki.automotivelinux.org/troubleshooting/app-recipes"; \
         make package)
-    popd
 
-    pushd ${S}/build-test
+    cd ${S}/build-test
         ${S}/autobuild/agl/autobuild package-test BUILD_DIR=${S}/build-test DEST=${S}/widgets VERBOSE=TRUE || \
         ( bbwarn "Target: package-test failed")
-    popd
 
-    pushd ${S}/build-debug
+    cd ${S}/build-debug
         ${S}/autobuild/agl/autobuild package-debug BUILD_DIR=${S}/build-debug DEST=${S}/widgets VERBOSE=TRUE || \
         ( bbwarn "Target: package-debug failed")
-    popd
 
-    pushd ${S}/build-coverage
+    cd ${S}/build-coverage
         ${S}/autobuild/agl/autobuild package-coverage BUILD_DIR=${S}/build-coverage DEST=${S}/widgets VERBOSE=TRUE || \
         ( bbwarn "Target: package-coverage failed")
-    popd
 }
 
 python () {