Summary: | r438058 and r438901 cause trouble for PACKAGES settings with colons in them | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Dimitry Andric <dim> |
Component: | Ports Framework | Assignee: | Port Management Team <portmgr> |
Status: | Closed Not A Bug | ||
Severity: | Affects Some People | CC: | bapt, bugzilla.freebsd, ports-bugs |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Dimitry Andric
2017-04-23 13:37:33 UTC
Note: ports tree is at r439221. 438058: "Use native make(1) mechanism to create the package repository directory" bapt@ 438901: "Refactor do-package aka subpackages step 2" bapt@ fyi I am not sure how this can be fixed, but as a solution, don't use colons in your PACKAGES variables, and create symlinks to the correct directories. (In reply to Mathieu Arnold from comment #3) > I am not sure how this can be fixed, but as a solution, don't use colons in > your PACKAGES variables, and create symlinks to the correct directories. My solution was to simply revert r438901 and 438058 locally. I'm not sure if parts of make or Mk/*.mk will try to resolve symlinks? Reverting the commits is going to break things badly when things continue to move on. Your problem is that the directories are created using make(1) targets, and that make(1) targets are in the form of "word:" so if you have "target-with-a:in-the-middle:" it parses it as target-with-a that depends on in-the-middle:. The targets are only there to create the directories if they do not exist, so symlinks will work as long as the target exists. I think surrounding the target with quotes should be enough, but I can't try it (In reply to Baptiste Daroussin from comment #6) > I think surrounding the target with quotes should be enough, but I can't try > it Did you mean in bsd.port.mk, or in make.conf? But indeed, quoting the vale of PACKAGES, or escaping the colons, in /etc/make.conf makes it work again. E.g.: PACKAGES?="/share/dim/dist/FreeBSD:12:i386/latest" or: PACKAGES?=/share/dim/dist/FreeBSD\:12\:i386/latest both allow me to build ports, even with r438058 and r438901 applied. Let's close this bug then, but maybe it would be nice to have some sort of warning in bsd.port.mk about using colons (or other make metacharacters) in ports-related make.conf variables? I was meaning in bsd.port.mk :) quoting ${PKGFILE}: should imho to the trick (In reply to Baptiste Daroussin from comment #8) > I was meaning in bsd.port.mk :) quoting ${PKGFILE}: should imho to the trick No, I tried that, but PKGFILE is used in a great many other macros, so it eventually ends up erroring out anyway... Reverting Mk/bsd.port.mk to r438057 is the only solution which works for me. Since the pkg convention is to use colons for pathnames, these should also work for the upper bulding stages, in form of setting PACKAGES. Changing PACKAGES definition is no acceptable solution, it even contradicts pkg's native convention! It seems r441712 was reviewed and accepted as fix. Unfortunately it wasn't mentioned here, maybe I'm missing that reviews.freebsd.org is where fixes get discussed... However, USE_PACKAGE_DEPENDS is still broken as a result of r438058, 438901 and r441712, if PACKAGES are set and contain colons, due to the same cause initially reported here by Dimitry Andric. -harry |