Revert "Let --no-self-upgrade bootstrap OS packages. Fix #2432."

This reverts commit 6eb2d60166.
This commit is contained in:
Brad Warren
2016-02-16 17:10:59 -08:00
parent 8baf3b3750
commit dbc81490e5
3 changed files with 49 additions and 57 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ RUN apt-get update && \
apt-get clean
RUN pip install nose
RUN mkdir -p /home/lea/letsencrypt
RUN mkdir -p /home/lea/letsencrypt/letsencrypt
# Install fake testing CA:
COPY ./tests/certs/ca/my-root-ca.crt.pem /usr/local/share/ca-certificates/
+3 -7
View File
@@ -422,10 +422,9 @@ TempDir() {
if [ "$1" = "--le-auto-phase2" ]; then
if [ "$NO_SELF_UPGRADE" = 1 ]; then
# Phase 2: Create venv, install LE, and run.
shift 1 # the --le-auto-phase2 arg
if [ -f "$VENV_BIN/letsencrypt" ]; then
INSTALLED_VERSION=$("$VENV_BIN/letsencrypt" --version 2>&1 | cut -d " " -f 2)
else
@@ -1666,7 +1665,6 @@ else
exit 0
fi
if [ "$NO_SELF_UPGRADE" != 1 ]; then
echo "Checking for new version..."
TEMP_DIR=$(TempDir)
# ---------------------------------------------------------------------------
@@ -1818,8 +1816,6 @@ UNLIKELY_EOF
$SUDO cp "$TEMP_DIR/letsencrypt-auto" "$0"
# TODO: Clean up temp dir safely, even if it has quotes in its path.
rm -rf "$TEMP_DIR"
fi # A newer version is available.
fi # Self-upgrading is allowed.
"$0" --le-auto-phase2 "$@"
fi # should upgrade
"$0" --no-self-upgrade "$@"
fi
@@ -171,10 +171,9 @@ TempDir() {
if [ "$1" = "--le-auto-phase2" ]; then
if [ "$NO_SELF_UPGRADE" = 1 ]; then
# Phase 2: Create venv, install LE, and run.
shift 1 # the --le-auto-phase2 arg
if [ -f "$VENV_BIN/letsencrypt" ]; then
INSTALLED_VERSION=$("$VENV_BIN/letsencrypt" --version 2>&1 | cut -d " " -f 2)
else
@@ -236,7 +235,6 @@ else
exit 0
fi
if [ "$NO_SELF_UPGRADE" != 1 ]; then
echo "Checking for new version..."
TEMP_DIR=$(TempDir)
# ---------------------------------------------------------------------------
@@ -262,8 +260,6 @@ UNLIKELY_EOF
$SUDO cp "$TEMP_DIR/letsencrypt-auto" "$0"
# TODO: Clean up temp dir safely, even if it has quotes in its path.
rm -rf "$TEMP_DIR"
fi # A newer version is available.
fi # Self-upgrading is allowed.
"$0" --le-auto-phase2 "$@"
fi # should upgrade
"$0" --no-self-upgrade "$@"
fi