From d8ed6289682e29479641aca4beca20349b94a188 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 30 Aug 2014 23:12:05 -0700 Subject: [PATCH] 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 --- gentoo-layman/Dockerfile.template | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.26.2