From owner-svn-ports-all@FreeBSD.ORG Thu Apr 9 15:15:16 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04AF67A9 for ; Thu, 9 Apr 2015 15:15:15 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACE43859 for ; Thu, 9 Apr 2015 15:15:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t39FFFuR088625 for ; Thu, 9 Apr 2015 15:15:15 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t39FFF2Y088624 for svn-ports-all@freebsd.org; Thu, 9 Apr 2015 15:15:15 GMT (envelope-from bdrewery) Received: (qmail 49730 invoked from network); 9 Apr 2015 10:15:11 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 9 Apr 2015 10:15:11 -0500 Message-ID: <55269785.7030307@FreeBSD.org> Date: Thu, 09 Apr 2015 10:15:17 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Dmitry Marakasov Subject: Re: svn commit: r383191 - head/Mk References: <201504040535.t345ZJ9M028396@svn.freebsd.org> <20150408194202.GA45809@hades.panopticon> <5525A9C1.5010003@FreeBSD.org> <20150408232144.GX21982@hades.panopticon> <5525D48E.5090305@FreeBSD.org> <20150409110221.GB45809@hades.panopticon> In-Reply-To: <20150409110221.GB45809@hades.panopticon> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XAUkVhKcXL52Wwm1hh4BDmqFuQrQsux8A" Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 15:15:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XAUkVhKcXL52Wwm1hh4BDmqFuQrQsux8A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/9/2015 6:02 AM, Dmitry Marakasov wrote: > * Bryan Drewery (bdrewery@FreeBSD.org) wrote: >=20 >>>>>> Re-enable and rework check added in r370464 to validate the firs= t CATEGORY >>>>>> is set properly. The problem causing the revert in r370475 was = fixed in >>>>>> r383190. >>>>>> =20 >>>>>> With hat: portmgr >>>>> >>>>> This breaks countless usecases when port is build which does not be= long >>>>> to the ports tree. >>>> >>>> Please name even 1 case. >>> >>> I have a lot of WIP ports in flat directory. Tons of custom port >>> repositories on github with flat structure. >> >> Short of more details, that does not sound like a supported setup. >> >> I can't read your mind. Please give me a specific case or I can't help= =2E >=20 > What in this case is not specific enough? Port. Outside. Portstree. This is open to interpretation. What is "Portstree"? Is it the official ports tree? I have my own ports trees that work just fine. I am assuming now that you mean a port Makefile out in some random place that has its PORTSDIR set to a different place. I've never done or seen this. Please give actual example code next time. >=20 > It was perfectly supported until that check was introduced. >=20 >>>> Building a port with the wrong first CATEGORY results in a broken >>>> package as the origin is wrong. >>> >>> I'm not talking about wrong categories, I'm talking about ports outsi= de >>> of the ports tree. These should build perfectly fine. >>> >>>>> Afaik, we have that information in ports - based on >>>>> that PORTSDIR is chosen. The same mechanism should be used here to >>>>> conditionally enable the check. >>>> >>>> That made no sense. >>> >>> Explain. >>> >> >> I do not understand what you are trying to say. It makes no sense. >=20 > I'll elaborate. PORTSDIR is set up cleverly: though it defaults to > /usr/ports, when I work with portstree located elsewhere, PORTSDIR > catches that: >=20 > % make -C /usr/local/poudriere/ports/default/ports-mgmt/pkg -V PORTSDIR= > /usr/local/poudriere/ports/default It does respect PORTSDIR from env too. ~/git/poudriere # make -C /poudriere/ports/default/ports-mgmt/pkg -V PORTSDIR /root/svn/ports >=20 > and it's clever enough to not set bogus PORTSDIR when I work with a > separate port: >=20 > % cp -R /usr/ports/ports-mgmt/pkg /tmp && make -C /tmp/pkg -V PORTSDIR > /usr/ports >=20 > this seems to be base system (current, likely) feature, as the code > which processes that resides in /usr/share/mk/bsd.port.mk: >=20 > # Autodetect if the command is being run in a ports tree that's not roo= ted > # in the default /usr/ports. The ../../.. case is in case ports ever g= rows > # a third level. > .for RELPATH in . .. ../.. ../../.. > .if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk)= > _PORTSDIR=3D ${.CURDIR}/${RELPATH} > .endif > .endfor > _PORTSDIR?=3D /usr/ports > PORTSDIR!=3D realpath ${_PORTSDIR} > .endif >=20 Yes that is very new. > To conditionally disable that bogus category check, either the same > logic may be used, or this may be used indirectly (e.g. if ${.CURDIR} > does not reside in ${PORTSDIR}, disable the check, as we are working > outside the portstree). >=20 *That* made sense. Frankly I think all dev warnings should be disabled in that case though. Setting up ports like this may work but it is not a good way to test a port before committing or submitting it. Many ports and their framework files reference "CURDIR/../..". In r327743 I modified www/linux-seamonkey to use PORTSDIR here and I believe I broke the workflow for the maintainers testing. The ports tree really needs to be tested as a whole. This is why portshaker exists, so you can bring in your partial tree into a full tree. Unionfs in theory is for this too. --=20 Regards, Bryan Drewery --XAUkVhKcXL52Wwm1hh4BDmqFuQrQsux8A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVJpeFAAoJEDXXcbtuRpfPaqQH/iEhQ8Fbm8INLXWhnR/bFa3k QQ+tJtx9c+WSdC+sY8eDwurbaSaQKk2tT89hnmtpfetIemeYTKJv0+f9P/W9WGzp noOJkCnjZQXBEbyxw6B7jIG653Wo0pKB2adKLtmnM5NqloBpDZoGVxOm6RdAZYhu 2FvVX4I7yv4jizlMb9kVs86dsLS0riSLj2SwnmtA3qLd1OhnefhEJ2WwJaLTYbGB BIDV6tH9sc2j8i92M2VWP9hWHJcZfqju6qUPslR+FzB1pRiLgTjQCfag0JXY6EoQ jPt6mi+f8T9tv9qbSy1GmZTF0Usxxl3Z9wfHc/uU1HiGZtBcO4BdCaZ7HzDJ6Fw= =Mto2 -----END PGP SIGNATURE----- --XAUkVhKcXL52Wwm1hh4BDmqFuQrQsux8A--