Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#70080 closed defect (wontfix)

Make supported archs none implied by platforms any

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: base Version: 2.9.3
Keywords: Cc: jmroot (Joshua Root), ryandesign (Ryan Carsten Schmidt)
Port:

Description

There are arguably no cases where it makes sense to have platforms set to any but arch not set to none. Perhaps make that implied to minimize unnecessary code?

Change History (6)

comment:1 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase

It's trivial to imagine a situation where a noarch port is not the same on all platforms. Consider a build system that records the OS name and/or version into a text file that gets installed (a script, perhaps). Less trivially, consider a build system (like that of MacPorts base, for example) that records the results of running autoconf into a text file that gets installed.

comment:2 Changed 4 months ago by jmroot (Joshua Root)

Neither one is a necessary or sufficient condition for the other. The current default is safer because not setting these options when they should be set is a performance problem, but setting them when they should not be set is a correctness problem.

comment:3 in reply to:  1 Changed 4 months ago by barracuda156

Replying to ryandesign:

It's trivial to imagine a situation where a noarch port is not the same on all platforms. Consider a build system that records the OS name and/or version into a text file that gets installed (a script, perhaps).

But I am talking about an opposite situation: when a port which is same on all platforms is still arch-specific?

comment:4 in reply to:  2 Changed 4 months ago by barracuda156

Replying to jmroot:

Neither one is a necessary or sufficient condition for the other. The current default is safer because not setting these options when they should be set is a performance problem, but setting them when they should not be set is a correctness problem.

Okay, accepted. Can be closed then. It is indeed not necessary to come up with artificial examples, safety is more important.

comment:5 Changed 4 months ago by jmroot (Joshua Root)

Resolution: wontfix
Status: newclosed

Admittedly it is hard to think of an example where platforms any (not platforms {darwin any}!) would not be accompanied by supported_archs noarch. But I'm not 100% sure it always has to be the case, and since there are not all that many such ports and it's not that much effort to explicitly set supported_archs for them, I think it's best to leave this as is.

comment:6 Changed 4 months ago by jmroot (Joshua Root)

Actually I did just think of an example: libgcc. It doesn't install any arch-specific files itself, but arch checking needs to be done transitively from its dependents to its dependencies, so it must not be treated as noarch.

Note: See TracTickets for help on using tickets.