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
(cherry picked from commit ec8d6ea351)
mr4.2
Alexander Lutay 9 years ago
parent 5a733b04d2
commit eb16a70985

@ -274,8 +274,24 @@ ensure_augtool_present() {
echo "/usr/bin/augtool is present, nothing to do" echo "/usr/bin/augtool is present, nothing to do"
return 0 return 0
fi fi
echo "augtool isn't present, installing augeas-tools package:" 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