Date: Fri, 10 Jun 2022 08:10:15 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 264454] Do not build TEST_DEPENDS in case NO_TEST is set and do not run tests Message-ID: <bug-264454-7788-8E2unE6ZOJ@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-264454-7788@https.bugs.freebsd.org/bugzilla/> References: <bug-264454-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264454 Stefan E=C3=9Fer <se@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open --- Comment #11 from Stefan E=C3=9Fer <se@FreeBSD.org> --- (In reply to Bjoern A. Zeeb from comment #9) > You go by assumptions of what people are doing. Yes, given no further information I do have to make assumptions. > I do not do port upgrades; in fact I most often never do apart from sele= ct=20 > individual bits which I do not handle this way. > I build coherent image (tailored distribution) after FreeBSD version bump= s=20 > on main at times (I am not even doing every one of them). You cannot expect bsd.port.mk to provide the high level functionality for e= very use case. I have managed the port management tools: they do exactly that - provide user oriented and configurable functionality. But you do not have to use a tool like portmaster. Something as simple as t= he following script should be sufficient to build packages for a specified set= of ports without fetching or building anything not required: ---------------------------- #!/bin/sh -e WANTED=3D" shells/bash www/py-arxiv " make_wanted () { echo "$WANTED" | while read dir; do if [ -n "$dir" ]; then make -C $dir "$@" fi done } cd /usr/ports make_wanted clean REQUIRED=3D$(make_wanted run-depends-list | sort -u) for dir in $REQUIRED; do make -C $dir package done ---------------------------- This will create a consistent set of packages including all run dependencie= s.=20 One possible issue with such a simple approach is that it expects all ports= to be built for just the default flavor. FLAVOR support has been implemented in the ports system a way that is very unfriendly to any tool except poudriere. The port management tools provide the above shown functionality (and a lot more) in a way that optimizes the procedure and that can deal with non-defa= ult flavors. Trying to get all functionality for all possible non-standard use-cases into bsd.port.mk is the completely wrong approach. This Makefile provides a set = of primitive functions that can be used in scripts like the example above to implement any special case. It is much easier to deal with such use-cases in shell scripts (or other sc= ript languages) than in a Makefile. Makefiles implements target driven functionality, scripts implement procedures. The *-recursive function in bsd.port.mk have been implemented at a time when there were no port management tools (and not even the pkg command and PKGDB= ). They do not serve your use case well and probably never will. I have shown other examples where functionality at that level is not provided by bsd.por= t.mk in a way that is useful for tasks like those you want it to achieve. What you are doing is a typical use-case for poudriere. It builds packages = in a way that guarantees their consistency and always in a clean environment, not influenced by any ports already present on the base system. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264454-7788-8E2unE6ZOJ>