MT#11063 Sync with bootenv: switch to Packages.gz for guessing ngcp-installer package version

For some reason 'Packages' doesn't work for Carrier 3.x
We had to switch to 'Packages.gz' which works perfectly
on approx cache and should be fine for CE/PRO.

Change-Id: I15ae526aca33f3d819dba11b248882f88b37a1ee
changes/81/781/2
Alexander Lutay 10 years ago committed by Víctor Seva
parent 72f2c76e41
commit 5a06feb7e0

@ -1375,10 +1375,10 @@ get_installer_path() {
INSTALLER_PATH="http://${SIPWISE_REPO_HOST}/autobuild/pool/main/n/ngcp-installer/"
fi
wget --timeout=30 -O Packages "${repos_base_path}/Packages"
wget --timeout=30 -O Packages.gz "${repos_base_path}Packages.gz"
# sed: display paragraphs matching the "Package: ..." string, then grab string "^Version: " and display the actual version via awk
# sort -u to avoid duplicates in repositories shipping the ngcp-installer-pro AND ngcp-installer-pro-ha-v3 debs
local version=$(sed "/./{H;\$!d;};x;/Package: ${installer_package}/b;d" Packages | awk '/^Version: / {print $2}' | sort -u)
local version=$(zcat Packages.gz | sed "/./{H;\$!d;};x;/Package: ${installer_package}/b;d" | awk '/^Version: / {print $2}' | sort -u)
[ -n "$version" ] || die "Error: installer version for ngcp ${SP_VERSION}, Debian release $DEBIAN_RELEASE with installer package $installer_package could not be detected."

Loading…
Cancel
Save