Package could have -debug in their filename, but their service name is
without it.
Some package could exists with a basename-extension, so we need to grep
better to not catch them all.
Example: agl-service-bluetooth catch agl-service-bluetooth-map.
Change-Id: Ibc750e7893a8cbe3fc22a0d8f13a32c28a898bd1
Bug-AGL: SPEC-3495
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
grep -o '[a-z-]*.wgt' index.html | sort | uniq |
while read wgtfile
do
grep -o '[a-z-]*.wgt' index.html | sort | uniq |
while read wgtfile
do
- WGTNAME=$(echo $wgtfile | sed 's,.wgt$,,')
+ # remove extension and the debug state
+ WGTNAME=$(echo $wgtfile | sed 's,.wgt$,,' | sed 's,-debug$,,')
SERVICE_PLATFORM=0
SERVICE_USER=0
APPLICATION_USER=0
SERVICE_PLATFORM=0
SERVICE_USER=0
APPLICATION_USER=0
fi
echo "DEBUG: check presence of $WGTNAME"
fi
echo "DEBUG: check presence of $WGTNAME"
- NAMEID=$(grep id\\\":\\\"${WGTNAME} $LIST | cut -d\" -f4 | cut -d\\ -f1)
+ NAMEID=$(grep id\\\":\\\"${WGTNAME}\" $LIST | cut -d\" -f4 | cut -d\\ -f1)
if [ ! -z "$NAMEID" ];then
echo "DEBUG: $WGTNAME already installed as $NAMEID"
# need to kill then deinstall
if [ ! -z "$NAMEID" ];then
echo "DEBUG: $WGTNAME already installed as $NAMEID"
# need to kill then deinstall
lava-test-case afm-util-install-$WGTNAME --result pass
fi
# message is like \"added\":\"mediaplayer@0.1\"
lava-test-case afm-util-install-$WGTNAME --result pass
fi
# message is like \"added\":\"mediaplayer@0.1\"
- NAMEID=$(grep d\\\":\\\"${WGTNAME} $OUT | cut -d\" -f4 | cut -d\\ -f1)
+ NAMEID=$(grep d\\\":\\\"${WGTNAME}\" $OUT | cut -d\" -f4 | cut -d\\ -f1)
if [ -z "$NAMEID" ];then
echo "ERROR: Cannot get nameid"
if [ -z "$NAMEID" ];then
echo "ERROR: Cannot get nameid"
+ echo "DEBUG: ========== DUMPING output =========="
+ cat $OUT
+ echo "DEBUG: ========== END DUMP =========="
continue
fi
echo "DEBUG: $WGTNAME is installed as $NAMEID"
continue
fi
echo "DEBUG: $WGTNAME is installed as $NAMEID"