Revert "Use "dpkg-divert" instead of "purge" to avoid Debian's Python"

- this reverts commit a819c92949.
 - since Debian packages use an absolute path, they were broken by the diverts
 - ensure the local python is first in PATH
This commit is contained in:
Joe Ferguson 2016-08-05 15:11:16 -07:00
parent 19bca6a2b3
commit 50fc273793
13 changed files with 31 additions and 112 deletions

View File

@ -1,19 +1,7 @@
FROM buildpack-deps:jessie
# divert many traces of Debian Python (so that they are not used by mistake)
# https://bugs.debian.org/33263 :(
RUN set -ex \
&& for bits in \
# /etc/python* \
/usr/bin/*2to3* \
/usr/bin/*python* \
/usr/bin/pdb* \
/usr/bin/py* \
# /usr/lib/python* \
# /usr/share/python \
; do \
dpkg-divert --rename "$bits"; \
done
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

View File

@ -1,5 +1,8 @@
FROM debian:jessie
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

View File

@ -1,19 +1,7 @@
FROM buildpack-deps:wheezy
# divert many traces of Debian Python (so that they are not used by mistake)
# https://bugs.debian.org/33263 :(
RUN set -ex \
&& for bits in \
# /etc/python* \
/usr/bin/*2to3* \
/usr/bin/*python* \
/usr/bin/pdb* \
/usr/bin/py* \
# /usr/lib/python* \
# /usr/share/python \
; do \
dpkg-divert --rename "$bits"; \
done
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

View File

@ -1,19 +1,7 @@
FROM buildpack-deps:jessie
# divert many traces of Debian Python (so that they are not used by mistake)
# https://bugs.debian.org/33263 :(
RUN set -ex \
&& for bits in \
# /etc/python* \
/usr/bin/*2to3* \
/usr/bin/*python* \
/usr/bin/pdb* \
/usr/bin/py* \
# /usr/lib/python* \
# /usr/share/python \
; do \
dpkg-divert --rename "$bits"; \
done
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

View File

@ -1,5 +1,8 @@
FROM debian:jessie
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

View File

@ -1,19 +1,7 @@
FROM buildpack-deps:wheezy
# divert many traces of Debian Python (so that they are not used by mistake)
# https://bugs.debian.org/33263 :(
RUN set -ex \
&& for bits in \
# /etc/python* \
/usr/bin/*2to3* \
/usr/bin/*python* \
/usr/bin/pdb* \
/usr/bin/py* \
# /usr/lib/python* \
# /usr/share/python \
; do \
dpkg-divert --rename "$bits"; \
done
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

View File

@ -1,19 +1,7 @@
FROM buildpack-deps:jessie
# divert many traces of Debian Python (so that they are not used by mistake)
# https://bugs.debian.org/33263 :(
RUN set -ex \
&& for bits in \
# /etc/python* \
/usr/bin/*2to3* \
/usr/bin/*python* \
/usr/bin/pdb* \
/usr/bin/py* \
# /usr/lib/python* \
# /usr/share/python \
; do \
dpkg-divert --rename "$bits"; \
done
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

View File

@ -1,5 +1,8 @@
FROM debian:jessie
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

View File

@ -1,19 +1,7 @@
FROM buildpack-deps:wheezy
# divert many traces of Debian Python (so that they are not used by mistake)
# https://bugs.debian.org/33263 :(
RUN set -ex \
&& for bits in \
# /etc/python* \
/usr/bin/*2to3* \
/usr/bin/*python* \
/usr/bin/pdb* \
/usr/bin/py* \
# /usr/lib/python* \
# /usr/share/python \
; do \
dpkg-divert --rename "$bits"; \
done
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

View File

@ -1,19 +1,7 @@
FROM buildpack-deps:jessie
# divert many traces of Debian Python (so that they are not used by mistake)
# https://bugs.debian.org/33263 :(
RUN set -ex \
&& for bits in \
# /etc/python* \
/usr/bin/*2to3* \
/usr/bin/*python* \
/usr/bin/pdb* \
/usr/bin/py* \
# /usr/lib/python* \
# /usr/share/python \
; do \
dpkg-divert --rename "$bits"; \
done
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

View File

@ -1,5 +1,8 @@
FROM debian:jessie
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

View File

@ -1,19 +1,7 @@
FROM buildpack-deps:jessie
# divert many traces of Debian Python (so that they are not used by mistake)
# https://bugs.debian.org/33263 :(
RUN set -ex \
&& for bits in \
# /etc/python* \
/usr/bin/*2to3* \
/usr/bin/*python* \
/usr/bin/pdb* \
/usr/bin/py* \
# /usr/lib/python* \
# /usr/share/python \
; do \
dpkg-divert --rename "$bits"; \
done
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

View File

@ -1,5 +1,8 @@
FROM debian:jessie
# ensure local python is used over debian python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8