From: W. Trevor King Date: Sun, 31 Aug 2014 06:12:05 +0000 (-0700) Subject: gentoo-layman/Dockerfile.template: Work around the lack of Python 2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8ed6289;p=dockerfile.git gentoo-layman/Dockerfile.template: Work around the lack of Python 2 The existing stable version of Layman needs Python 2, but the ~amd64 version is compatible with Python 3: $ cd /usr/portage/app-portage/layman $ grep 'PYTHON_COMPAT\|KEYWORDS' *ebuild layman-2.0.0-r1.ebuild:PYTHON_COMPAT=( python{2_6,2_7} pypy2_0 ) layman-2.0.0-r1.ebuild:KEYWORDS="... amd64 ..." layman-2.0.0-r3.ebuild:PYTHON_COMPAT=( python{2_6,2_7} pypy pypy2_0 ) layman-2.0.0-r3.ebuild:KEYWORDS="... amd64 ..." layman-2.1.0-r2.ebuild:PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) layman-2.1.0-r2.ebuild:KEYWORDS="... ~amd64 ..." layman-9999.ebuild:PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) layman-9999.ebuild:KEYWORDS="" Layman also needs Git, and with the 'python' USE flag enabled, Git needs Python 2: $ cd /usr/portage/dev-vcs/git $ grep PYTHON_COMPAT *ebuild git-1.8.3.2-r1.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-1.8.4.5.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-1.8.5.5.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-1.9.3.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-2.0.1.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-2.0.2.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-2.0.4.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-9999-r1.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-9999-r2.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-9999-r3.ebuild:PYTHON_COMPAT=( python2_{6,7} ) git-9999.ebuild:PYTHON_COMPAT=( python2_{6,7} ) The only interesting Git features enabled by the 'python' USE flag are the Bazaar and Mercurial remote helpers, and even they were removed in Git 2.0.0 [1,2]. [1]: https://git.kernel.org/cgit/git/git.git/commit/?id=b2c851a8e67da752d8a5dbde5a9dae6e3428a4c9 [2]: https://git.kernel.org/cgit/git/git.git/commit/?id=896ba14d653c43bd7a43b6b291e941ab60855c04 --- diff --git a/gentoo-layman/Dockerfile.template b/gentoo-layman/Dockerfile.template index 53d2999..3516234 100644 --- a/gentoo-layman/Dockerfile.template +++ b/gentoo-layman/Dockerfile.template @@ -25,6 +25,16 @@ FROM ${NAMESPACE}/gentoo-syslog:${TAG} MAINTAINER ${MAINTAINER} #VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"] + +RUN mkdir /etc/portage/package.accept_keywords +RUN mkdir /etc/portage/package.use +# avoid a Python 2 dependency +RUN echo 'dev-vcs/git -python' >> /etc/portage/package.use/layman +RUN echo 'app-portage/layman ~amd64' >> /etc/portage/package.accept_keywords/layman +# required by app-portage/layman-2.1.0-r2 +# =dev-python/ssl-fetch-0.2.1 ~amd64 +RUN echo 'dev-python/ssl-fetch ~amd64' >> /etc/portage/package.accept_keywords/layman + RUN emerge -v layman RUN eselect news read new RUN echo 'source /var/lib/layman/make.conf' >> /etc/portage/make.conf