[MacPorts] #28640: port lint should warn when *-append should be used
#28640: port lint should warn when *-append should be used ------------------------------+--------------------------------------------- Reporter: l2g@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 1.9.2 Keywords: | Port: ------------------------------+--------------------------------------------- It would be nice if the lint command could warn when *-append should be used but isn't being used. This is mainly important for PortGroups, where an accidental setting in a portfile like depends_lib instead of depends_lib-append may wipe out defaults already set in the PortGroup (as recently pointed out to me by Brad "pixilla" Giesbrecht). -- Ticket URL: <https://trac.macports.org/ticket/28640> MacPorts <http://www.macports.org/> Ports system for Mac OS
#28640: port lint should warn when *-append should be used ------------------------------+--------------------------------------------- Reporter: l2g@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 1.9.2 Keywords: | Port: ------------------------------+--------------------------------------------- Changes (by ryandesign@…): * cc: ryandesign@… (added) Comment: One solution would be to suggest that users always use depends_*-append to add to dependencies, and never set depends_* -- for all ports. In the majority of ports, which don't use portgroups, this wouldn't make a difference, and would result in lots of lint warnings that people would get annoyed by. This could be refined to only print this warning if the port uses a portgroup. This would cut down on the unnecessary warnings, but not eliminate them; many portgroups don't add dependencies (xcode, xcodeversion, archcheck), or at least, don't add to all of the dependency types. To "do it right", lint would have to notice the use of a portgroup, evaluate it to see what dependencies it is declaring, and only print its warning if the port sets a dependency type the portgroup is already setting. A further case to consider is "use_autoconf yes" and "use_autoreconf yes". These appends to depends_build; if the port sets depends_build on a subsequent line, it overwrites the needed autoconf dependencies. Ports must therefore either use depends_build-append in these cases, or set their depends_build on a line before they request the use of autoconf or autoreconf. -- Ticket URL: <https://trac.macports.org/ticket/28640#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts