Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56837 closed defect (fixed)

textmate2: parsing Portfile fails on on OS 10.10

Reported by: petrrr Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc:
Port: textmate2

Description

Recently, the port is not correctly parsed and index during sync or selfupdate on my OS X 10.10.5 machine.

It seems to be the only port affected so I am compiling this against the port itself, though I could imagine this might be attributable to some changes in base as well.

petr% sudo port -v sync
--->  Updating the ports tree
Synchronizing local ports tree from file:///opt/local/var/macports/sources/github.com/macports/macports-ports/
Current branch master is up to date.
Creating port index in /opt/local/var/macports/sources/github.com/macports/macports-ports
Error: Unable to determine location of a macOS SDK.
Failed to parse file editors/textmate2/Portfile: can't read "configure.sdkroot": Unable to determine location of a macOS SDK.

Total number of ports parsed:	1 
Ports successfully parsed:	0 
Ports failed:			1 
Up-to-date ports skipped:	20127

Change History (5)

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

I get the same thing on 10.6.8:

$ port info textmate2
Error: Unable to determine location of a macOS SDK.
Error: Unable to open port: can't read "configure.sdkroot": Unable to determine location of a macOS SDK.

Looking at the portfile, I think the sdk logic needs to be reworked a bit, most likely.

comment:2 Changed 6 years ago by neverpanic (Clemens Lang)

This happens because you do not have a 10.11 SDK, which is required for textmate2 to build. This was introduced in [f25115b5cd12db55206a1af8f6113480ccd98d83/macports-ports] by Ryan to fix #55771.

Do you expect the textmate2 port to parse fine without errors or do you actually expect it to build on 10.10?

Also, per our usual support policy, we mainly target 10.13, 10.12 and 10.11. Consider upgrading to a newer version.

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

a graceful error indicating a need for 10.11 or greater would be ideal, I think. It should somehow fall through to the system test and error there, rather than the mysterious error about sdkroot which is not too enlightening.

Last edited 6 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 6 years ago by petrrr

I think it is perfectly fine if some ports cannot be build on old systems. This ticket is about the correct parsing and graceful handling of such a case.

The effect of not being able to parse the Portfile correctly is for example that I cannot even do

petr% port info textmate2
Error: Port textmate2 not found

to get some extra info, maintainer, etc.

And I suspect the this also might breaks reclaim, though I am not sure on this one.

--->  Building list of distfiles still in use
Keeping /opt/local/var/macports/distfiles/bcwipe/BCWipe-1.7-7.tar.gz
Keeping /opt/local/var/macports/distfiles/pgf/pgf_3.0.1.tds.zip
Keeping /opt/local/var/macports/distfiles/setxkbmap/setxkbmap-1.3.1.tar.bz2
[...]
Keeping /opt/local/var/macports/distfiles/py-fastavro/fastavro-0.14.3.tar.gz
Keeping /opt/local/var/macports/distfiles/py-configargparse/ConfigArgParse-0.10.0.tar.gz
Keeping /opt/local/var/macports/distfiles/py-xmltodict/xmltodict-0.9.2.tar.gz
Error: reclaim failed: wrong # args: should be "getdistname name"

comment:5 Changed 6 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

In 80e429b659adaff32a0eee4f842ae38d6cead3d9/macports-ports (master):

textmate2: Fix Portfile parsing on older systems

Reading ${configure.sdkroot} throws an error if no suitable SDK is
available. This means that ${configure.sdkroot} cannot be used without
a catch clause outside of a phase in a Portfile, which is unfortunate.

Until this API deficiency is fixed, avoid parse problems by adding catch
statements around uses of ${configure.sdkroot}.

Closes: #56837

Note: See TracTickets for help on using tickets.