From: W. Trevor King Date: Thu, 31 Jul 2014 21:51:51 +0000 (-0700) Subject: buildbot/Dockerfile.template: Adjust Python 2 dependency X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1223eaba0a0790bed1e3b306b93a8488a75ddcf;p=dockerfile.git buildbot/Dockerfile.template: Adjust Python 2 dependency Now that the ancestor gentoo-python image is removing Python 2, we need to get it back for Buildbot [1,2]. We need to keep the USE_PYTHON setting (with a tweaked value) because buildbot hasn't transitioned to the *-r1 Python eclasses yet: $ grep 'inherit.*distutils' /usr/portage/dev-util/buildbot*/*ebuild /usr/portage/dev-util/buildbot-slave/buildbot-slave-0.8.7_p1.ebuild:inherit distutils readme.gentoo user /usr/portage/dev-util/buildbot-slave/buildbot-slave-0.8.8-r1.ebuild:inherit distutils readme.gentoo systemd user /usr/portage/dev-util/buildbot-slave/buildbot-slave-0.8.8.ebuild:inherit distutils readme.gentoo user /usr/portage/dev-util/buildbot-slave/buildbot-slave-0.8.9.ebuild:inherit distutils readme.gentoo systemd user /usr/portage/dev-util/buildbot-slave/buildbot-slave-9999.ebuild:inherit distutils readme.gentoo user /usr/portage/dev-util/buildbot/buildbot-0.8.7_p1-r1.ebuild:inherit distutils readme.gentoo user /usr/portage/dev-util/buildbot/buildbot-0.8.8-r2.ebuild:inherit distutils readme.gentoo systemd user /usr/portage/dev-util/buildbot/buildbot-0.8.9.ebuild:inherit distutils readme.gentoo systemd user /usr/portage/dev-util/buildbot/buildbot-9999.ebuild:inherit distutils readme.gentoo user systemd Also, instead of hardcoding the packages effected by the sqlite USE flag change, just use --newuse on @system and @world and let Portage figure out what needs to be rebuilt. [1]: Buildbot will transition after Twisted (http://trac.buildbot.net/wiki/CompatibilityPolicy#Python3) [2]: Twisted is 60% of the way there (94/157 Python 3 tickets, https://twistedmatrix.com/trac/milestone/Python-3.x) --- diff --git a/buildbot/Dockerfile.template b/buildbot/Dockerfile.template index b0e278b..07dd602 100644 --- a/buildbot/Dockerfile.template +++ b/buildbot/Dockerfile.template @@ -26,10 +26,11 @@ FROM ${NAMESPACE}/gentoo-syslog:${TAG} MAINTAINER ${MAINTAINER} #VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"] RUN echo 'USE="${USE} sqlite"' >> /etc/portage/make.conf -RUN echo 'PYTHON_TARGETS="python2_7 python3_3"' >> /etc/portage/make.conf -RUN echo 'PYTHON_SINGLE_TARGET="python3_3"' >> /etc/portage/make.conf -RUN echo 'USE_PYTHON="2.7 3.3"' >> /etc/portage/make.conf -RUN emerge -v1 --newuse dev-lang/python:2.7 dev-lang/python:3.3 +RUN sed -i 's/\(PYTHON_TARGETS\)=.*/\1="python2_7"/' /etc/portage/make.conf +RUN sed -i 's/\(PYTHON_SINGLE_TARGET\)=.*/\1="python2_7"/' /etc/portage/make.conf +RUN echo 'USE_PYTHON="2.7"' >> /etc/portage/make.conf +RUN emerge -v --newuse --deep --with-bdeps=y @system @world +RUN eselect python set $(eselect python show --python2) RUN emerge -v dev-util/buildbot dev-util/buildbot-slave RUN eselect news read new RUN rc-update add buildmaster default