From owner-svn-ports-all@FreeBSD.ORG Thu Apr 9 11:02:29 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B1DC54C; Thu, 9 Apr 2015 11:02:29 +0000 (UTC) Received: from vps.amdmi3.ru (vps.amdmi3.ru [109.234.38.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4D786345; Thu, 9 Apr 2015 11:02:28 +0000 (UTC) Received: from hive.panopticon (unknown [213.148.20.85]) by vps.amdmi3.ru (Postfix) with ESMTPS id 0F2CDB0622; Thu, 9 Apr 2015 14:02:26 +0300 (MSK) Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 55F06E2F; Thu, 9 Apr 2015 14:02:19 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 98ED9C91B; Thu, 9 Apr 2015 14:02:21 +0300 (MSK) Date: Thu, 9 Apr 2015 14:02:21 +0300 From: Dmitry Marakasov To: Bryan Drewery Subject: Re: svn commit: r383191 - head/Mk Message-ID: <20150409110221.GB45809@hades.panopticon> References: <201504040535.t345ZJ9M028396@svn.freebsd.org> <20150408194202.GA45809@hades.panopticon> <5525A9C1.5010003@FreeBSD.org> <20150408232144.GX21982@hades.panopticon> <5525D48E.5090305@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5525D48E.5090305@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 11:02:29 -0000 * Bryan Drewery (bdrewery@FreeBSD.org) wrote: > >>>> Re-enable and rework check added in r370464 to validate the first CATEGORY > >>>> is set properly. The problem causing the revert in r370475 was fixed in > >>>> r383190. > >>>> > >>>> With hat: portmgr > >>> > >>> This breaks countless usecases when port is build which does not belong > >>> 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. What in this case is not specific enough? Port. Outside. Portstree. It was perfectly supported until that check was introduced. > >> 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 outside > > 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. I'll elaborate. PORTSDIR is set up cleverly: though it defaults to /usr/ports, when I work with portstree located elsewhere, PORTSDIR catches that: % make -C /usr/local/poudriere/ports/default/ports-mgmt/pkg -V PORTSDIR /usr/local/poudriere/ports/default and it's clever enough to not set bogus PORTSDIR when I work with a separate port: % cp -R /usr/ports/ports-mgmt/pkg /tmp && make -C /tmp/pkg -V PORTSDIR /usr/ports this seems to be base system (current, likely) feature, as the code which processes that resides in /usr/share/mk/bsd.port.mk: # Autodetect if the command is being run in a ports tree that's not rooted # in the default /usr/ports. The ../../.. case is in case ports ever grows # a third level. .for RELPATH in . .. ../.. ../../.. .if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk) _PORTSDIR= ${.CURDIR}/${RELPATH} .endif .endfor _PORTSDIR?= /usr/ports PORTSDIR!= realpath ${_PORTSDIR} .endif 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). -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://amdmi3.ru