From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 316DD1381F3 for ; Sat, 14 Sep 2013 23:33:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 238FFE0B0C; Sat, 14 Sep 2013 23:33:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 95412E0B0C for ; Sat, 14 Sep 2013 23:33:08 +0000 (UTC) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 22C9233EBCE for ; Sat, 14 Sep 2013 23:33:06 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id x13so5326575ief.3 for ; Sat, 14 Sep 2013 16:33:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=2w/SwUQHqzW3YCaewUYibUtYclfK/v5qDvHLx0PAOSw=; b=mv8O+l+MFlgm7mTZcIb4ayx4r0sP5Kzl85AMcw0pp2H36HE08S+9PFyjfe3zkQBLRa arxMu2vIL+Sxxs2SHgQ2Lqum51Wkw16eHoO2fG1nMqWn0migl5zLEWUvQfIgG9fz31dW jRif+8Cb4GkJP6aI4NaeyG3prwrhIlqqUN7mTkJS6yWDX8CA+oct3jn9pat0NeJX8NgJ 5+//0JidcYbLZoL6Q9wQbIRMVbwDVO5pfajpDDPTSIIYDgvPUqE1aqYVbvQLnU6r0Kwn CGOOoWgJzCOEMEhT7tjO08TmBlhE7AmfJsSUv46NGIcmy3+j+aGAhKFZDWodBncST0Tf 4/3w== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.42.65.82 with SMTP id k18mr3296177ici.23.1379201584650; Sat, 14 Sep 2013 16:33:04 -0700 (PDT) Received: by 10.64.62.148 with HTTP; Sat, 14 Sep 2013 16:33:04 -0700 (PDT) In-Reply-To: <20130915003852.3f989dab@gentoo.org> References: <1379098729-2801-1-git-send-email-mgorny@gentoo.org> <1379098729-2801-6-git-send-email-mgorny@gentoo.org> <20130915003852.3f989dab@gentoo.org> Date: Sat, 14 Sep 2013 19:33:04 -0400 Message-ID: Subject: Re: [gentoo-python] Re: [PATCH 5/8] distutils-r1: disable sub-root merging. From: Mike Gilbert To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Cc: gentoo-python , Gentoo Python Project Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 5d3a2b00-6972-478f-81db-8cd107da491f X-Archives-Hash: 3fb4bd9699f1527f9532000428a80e85 On Sat, Sep 14, 2013 at 6:38 PM, Micha=C5=82 G=C3=B3rny = wrote: > Dnia 2013-09-14, o godz. 18:16:33 > Mike Gilbert napisa=C5=82(a): > >> On Fri, Sep 13, 2013 at 2:58 PM, Micha=C5=82 G=C3=B3rny wrote: >> > The sub-roots are no longer necessary since we're installing scripts t= o >> > per-impl directories initially. >> > --- >> > gx86/eclass/distutils-r1.eclass | 9 +++------ >> > 1 file changed, 3 insertions(+), 6 deletions(-) >> > >> > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r= 1.eclass >> > index 7102c58..5fcb55e 100644 >> > --- a/gx86/eclass/distutils-r1.eclass >> > +++ b/gx86/eclass/distutils-r1.eclass >> > @@ -476,9 +476,7 @@ distutils-r1_python_install() { >> > addpredict "$(python_get_sitedir)" >> > addpredict /usr/lib/portage/pym >> > >> > - local root=3D${D}/_${EPYTHON} >> > - [[ ${DISTUTILS_SINGLE_IMPL} ]] && root=3D${D} >> > - flags+=3D( --root=3D"${root}" ) >> > + flags+=3D( --root=3D"${D}" ) >> > >> > if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then >> > local PYTHON_SCRIPTDIR >> > @@ -488,13 +486,12 @@ distutils-r1_python_install() { >> > >> > esetup.py install "${flags[@]}" "${@}" >> > >> > - if [[ -d ${root}$(python_get_sitedir)/tests ]]; then >> > + if [[ -d ${D}$(python_get_sitedir)/tests ]]; then >> > die "Package installs 'tests' package, file collisions= likely." >> > fi >> > >> > if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then >> > - _distutils-r1_wrap_scripts "${root}" >> > - multibuild_merge_root "${root}" "${D}" >> > + _distutils-r1_wrap_scripts "${D}" >> > fi >> > } >> > >> > -- >> > 1.8.3.2 >> > >> >> I believe this patch causes a race condition which causes >> java-config's ebuild to fail. >> >> running install_data >> running install_egg_info >> Writing /tmp/portage/dev-java/java-config-2.2.0/image/usr/lib64/python2.= 7/site-packages/java_config- >> 2.2.0-py2.7.egg-info >> error: /tmp/portage/dev-java/java-config-2.2.0/image//usr/share/java-con= fig-2/config/: >> File exists > > I love when people hack build systems and have no idea about writing > build systems... > > What are you suggesting? Finding all the broken stuff and fixing it, or > restoring sub-roots? > This is a well-used package which will be broken if we apply this patch. I'm not sure we can reliably identify this kind of problem, and fixing individual packages would be a bit of work in any case.. Keeping the sub-roots code in place seems like the safer course of action here. Also FYI, I looked into java-config's setup.py, and the code has an unchecked os.mkdir call followed by an open() call. The former will fail for multiple python implementations even with a serialized install, and the latter is racy.