svn commit: r383191 - head/Mk
Dmitry Marakasov
amdmi3 at amdmi3.ru
Thu Apr 9 11:02:29 UTC 2015
* Bryan Drewery (bdrewery at 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 at amdmi3.ru ..: jabber: amdmi3 at jabber.ru http://amdmi3.ru
More information about the svn-ports-all
mailing list