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 45B3F138844 for ; Mon, 4 Feb 2013 06:59:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9DE9E0656; Mon, 4 Feb 2013 06:59:11 +0000 (UTC) Received: from icp-osb-irony-out3.external.iinet.net.au (icp-osb-irony-out3.external.iinet.net.au [203.59.1.219]) by pigeon.gentoo.org (Postfix) with ESMTP id 674BEE0656 for ; Mon, 4 Feb 2013 06:59:10 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhYFAIJbD1F8lVha/2dsb2JhbABEhV9puG8Wc4IfAQEEASNbCwsNDQIFIQICDxA4GRuHcAWtMZFbgSONBoIWgRMDiGSEYIUkA4MzgR6EdYo/gwk X-IronPort-AV: E=Sophos;i="4.84,597,1355068800"; d="scan'208";a="93773019" Received: from unknown (HELO archtester.homenetwork) ([124.149.88.90]) by icp-osb-irony-out3.iinet.net.au with ESMTP; 04 Feb 2013 14:59:08 +0800 Date: Mon, 4 Feb 2013 14:59:07 +0800 From: IAN DELANEY To: gentoo-python@lists.gentoo.org Subject: Re: [gentoo-python] [PATCH] Error out if something installs the 'tests' package. Message-ID: <20130204145907.74b6366f@archtester.homenetwork> In-Reply-To: <1359886764-13676-1-git-send-email-mgorny@gentoo.org> References: <1359886764-13676-1-git-send-email-mgorny@gentoo.org> Organization: homenetwork X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.13; x86_64-pc-linux-gnu) 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: fbc03ea3-3db0-4832-85b8-31c17d7015be X-Archives-Hash: e929cedbd78c64fef12f518417a351c2 On Sun, 3 Feb 2013 11:19:24 +0100 Micha=C5=82 G=C3=B3rny wrote: > This is a common error, especially in my ebuilds or those based on > mine. It gives a bunch of collisions, so dying here seems to be > acceptable while eqawarn is easy to miss. > --- > gx86/eclass/distutils-r1.eclass | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/gx86/eclass/distutils-r1.eclass > b/gx86/eclass/distutils-r1.eclass index 27730f5..13d65b5 100644 > --- a/gx86/eclass/distutils-r1.eclass > +++ b/gx86/eclass/distutils-r1.eclass > @@ -367,6 +367,10 @@ distutils-r1_python_install() { > =20 > esetup.py install "${flags[@]}" --root=3D"${root}" "${@}" > =20 > + if [[ -d ${root}$(python_get_sitedir)/tests ]]; then > + die "Package installs 'tests' package, file > collisions likely." > + fi > + > if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then > _distutils-r1_rename_scripts "${root}" > _distutils-r1_merge_root "${root}" "${D}" Actually I don't like it. I did a 'fix' like this to a package in a more rare instance concerning building of docs, but the Rx was to abort and call die and tell the user to start again. The chief critic of this concluded I didn't know what I was doing, but then he's known for his prolific and indiscriminant use of hyperbole. The 'better' solution was to indeed to correct the underlying flaw and and get on with emerging the package. The practice of 'abort and start again' is, I admit, unsavoury at best.=20 Given that this is a relatively common error, let's get a 'clear picture' of the status of the presence of the relatively common instance test folders and suites in python packages. There are some that install them and some that don't, so we're forced to chase a 'moving target'. Can we decide categorically that test suites need and ought not be installed in python packages, or do we have to water it down with "Oh it depends on these dozens of possibilities and those ones over there"? This creates a myriad of scenarios of uncertainty. Step 1. Make the target still Step 2. Once the target is still, then deal with it accordingly; install them in a collision free fashion, or delete them once and for all if we can declare then un-needed. The latter has quite a bit going for it. Step 3. Make potential critics like the anonymous dev previously and obliquely cited forever silent, and get on with emerging the package.=20 --=20 kind regards Ian Delaney