MT#17673 Fix 9835b80: augeas-tools installation from ${DEBIAN_RELEASE}

We have no apt source lists configured at that moment,
so we have to install it through temporary apt database

Change-Id: Ia8dc8c9a9fa37ac92f84d78739ad7f8bea7e34a4
changes/39/4939/1
Alexander Lutay 9 years ago
parent 9835b801e0
commit ec8d6ea351

@ -290,8 +290,24 @@ ensure_augtool_present() {
echo "/usr/bin/augtool is present, nothing to do"
return 0
fi
echo "augtool isn't present, installing augeas-tools package:"
apt-get -y --no-install-recommends install augeas-tools
# use temporary apt database for speed reasons
local TMPDIR=$(mktemp -d)
mkdir -p "${TMPDIR}/etc/preferences.d" "${TMPDIR}/statedir/lists/partial" \
"${TMPDIR}/cachedir/archives/partial"
echo "deb http://${DEBIAN_REPO_HOST}/debian/ ${DEBIAN_RELEASE} main contrib non-free" > \
"${TMPDIR}/etc/sources.list"
DEBIAN_FRONTEND='noninteractive' apt-get -o dir::cache="${TMPDIR}/cachedir" \
-o dir::state="${TMPDIR}/statedir" -o dir::etc="${TMPDIR}/etc" \
-o dir::etc::trustedparts="/etc/apt/trusted.gpg.d/" update
DEBIAN_FRONTEND='noninteractive' apt-get -o dir::cache="${TMPDIR}/cachedir" \
-o dir::etc="${TMPDIR}/etc" -o dir::state="${TMPDIR}/statedir" \
-o dir::etc::trustedparts="/etc/apt/trusted.gpg.d/" \
-y --no-install-recommends install augeas-tools
}
### }}}

Loading…
Cancel
Save