meta-google: gbmc-update: Fix unpacking nested directories
We don't actually store the firmware at a top-level directory, we expect
it to be stored in a hierarchy of directories.
Change-Id: I04eebb166d34616b346b401d1201574939cab60c
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-phosphor/flash/gbmc-update.bb b/meta-google/recipes-phosphor/flash/gbmc-update.bb
index c0a3f7a..48f645e 100644
--- a/meta-google/recipes-phosphor/flash/gbmc-update.bb
+++ b/meta-google/recipes-phosphor/flash/gbmc-update.bb
@@ -12,6 +12,7 @@
FILES:${PN} += "${datadir}/gbmc-br-dhcp"
RDEPENDS:${PN} += "curl"
+RDEPENDS:${PN} += "tar"
do_install() {
install -d ${D}${datadir}/gbmc-br-dhcp
diff --git a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
index 34beed3..0124e38 100644
--- a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
+++ b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
@@ -57,7 +57,7 @@
while true; do
local st=()
curl -LSsk --max-time $((timeout - SECONDS)) "$bootfile_url" |
- tar "${tflags[@]}" -xC "$tmpdir" "firmware-gbmc/$machine" \
+ tar "${tflags[@]}" --wildcards -xC "$tmpdir" "*/firmware-gbmc/$machine" \
&& st=("${PIPESTATUS[@]}") || st=("${PIPESTATUS[@]}")
# Curl failures should continue
if (( st[0] == 0 )); then