Opened 4 years ago

Closed 4 years ago

#60412 closed defect (fixed)

clang-3.7, clang-5.0, clang-6.0, clang-7.0, clang-8.0, clang-9.0, clang-devel: can't read "pythonfullpath": no such variable

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: clang-3.7, clang-5.0, clang-6.0, clang-7.0, clang-8.0, clang-9.0, clang-devel

Description

$ port info clang-3.7 os.platform=linux
Error: Unable to open port: can't read "pythonfullpath": no such variable

See [0a5a1cf9b1a094b6555e0b87eff2b257400fb8a3/macports-ports] which introduced the pythonfullpath variable but only on darwin.

Change History (6)

comment:1 Changed 4 years ago by kencu (Ken)

hah. I knew there was going to be a reason I wouldn't want to touch this.

comment:2 Changed 4 years ago by kencu (Ken)

I think, for this, I can just remove the platform darwin guard.

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

It would be better not to base a decision of whether or not to add a depenency on whether or not a file exists. One reason is that the portindex files differ based on OS version but are all created on our buildmaster machine by faking different OS versions by passing different values for os.major. If you decide whether to add a python dependency based on whether a path exists, then the portindex for all OS versions will either add or not add the dependency, depending on whether the path exists on whatever OS version we happen to use on our buildmaster, rather than varying, as you had intended, based on the user's OS version. Therefore, please base the decision on os.major instead. /usr/bin/python2.7 does exist on Lion and later, so perhaps:

# use the system python27 if present
if {${os.platform} eq "darwin" && ${os.major} >= 11} {
    set pythonfullpath   /usr/bin/python2.7
} else {
    set pythonfullpath   ${prefix}/bin/python2.7
    depends_lib-append   port:python27
}

comment:4 Changed 4 years ago by kencu (Ken)

that breaks when, as you pointed out, Apple no longer ships python. Ergo the (bulletproof, I thought) file test.

comment:5 Changed 4 years ago by kencu (Ken)

but i guess we add more tests then...sigh.

comment:6 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.