Opened 16 months ago

Last modified 16 months ago

#58653 new defect

Some portfiles fail to parse under linux

Reported by: mojca (Mojca Miklavec) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld (Michael Dickens), essandess (Steve Smith), ddennedy (Dan Dennedy), RJVB (René Bertin), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), rowue (Rolf Würdemann), reneeotten (Renee Otten), mojca (Mojca Miklavec), Korusuke (Karan Sheth)
Port: botan chicken fpc gnuradio macos-vpn-server mlt octave psi py-eric-ide qt4-mac texworks wireshark22

Description

Some ports fail to parse on linux:

Failed to parse file foo/bar/Portfile: MacPorts does not support qt4 on platforms other than darwin
Failed to parse file editors/texworks/Portfile: Error evaluating variants
Failed to parse file lang/chicken/Portfile: can't read "archs()": no such element in array
Failed to parse file lang/fpc/Portfile: can't read "b": no such variable
Failed to parse file math/octave/Portfile: Error evaluating variants
Failed to parse file multimedia/mlt/Portfile: Error evaluating variants
Failed to parse file net/macos-vpn-server/Portfile: couldn't execute "/usr/bin/sed": no such file or directory
Failed to parse file net/psi/Portfile: Error evaluating variants
Failed to parse file net/wireshark22/Portfile: Error evaluating variants
Failed to parse file python/py-eric-ide/Portfile with subport 'py27-eric-ide': Error evaluating variants
Failed to parse file python/py-eric-ide/Portfile with subport 'py37-eric-ide': Error evaluating variants
Failed to parse file science/gnuradio/Portfile: Error evaluating variants
Failed to parse file security/botan/Portfile: can't read "merger_configure_args()": no such element in array

And a large number of ports produce (probably harmless) warnings:

Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option

Warning: No value for java JAVA_HOME was automatically discovered

Warning: failed to determine the number of available CPUs (probably not supported on this platform)
Warning: defaulting to 2 jobs, consider setting buildmakejobs to a nonzero value in macports.conf

We don't need the software to actually build on Linux, but it should at least parse and produce a valid port information.

Change History (13)

comment:2 Changed 16 months ago by ryandesign (Ryan Schmidt)

In ca391542562b47b6ddcd615d918314fe729ccc23/macports-ports (master):

chicken: Fix parse error on Linux

See: #58653

comment:3 Changed 16 months ago by ryandesign (Ryan Schmidt)

In a7ca279b226480a3590c2c29e066fabd76080f57/macports-ports (master):

botan: Fix parse error on Linux

See: #58653

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

In 8389066f9f249ed67b23aca548ef75772a5087b1/macports-ports (master):

fpc: Fix parse failure on non-x86_64 systems

See: #58653

comment:5 Changed 16 months ago by ryandesign (Ryan Schmidt)

In a9e81c9fa17e2c0ab549cfe1efbf2fc034cee096/macports-ports (master):

psi: Use qt5 on non-Darwin systems

See: #58653

comment:6 Changed 16 months ago by ryandesign (Ryan Schmidt)

In 258cb288f8e11945a67fa82f8a22840b253d56a2/macports-ports (master):

mlt: Use qt5 on non-Darwin systems

See: #58653

comment:7 Changed 16 months ago by ryandesign (Ryan Schmidt)

In f75ad490ba63288e033795a0a8d9cf046c02e6c2/macports-ports (master):

octave: Use qt5 on non-Darwin systems

See: #58653

comment:8 Changed 16 months ago by ryandesign (Ryan Schmidt)

In cc4c7d72025cfef59a3f9a1f98ece3cb4b7a76f5/macports-ports (master):

py-eric-ide: Use qt5 on non-Darwin systems

See: #58653

comment:9 Changed 16 months ago by ryandesign (Ryan Schmidt)

In ec9f46591ca32b99db4f723b1ba71fd57902dd02/macports-ports (master):

texworks: Use qt5 on non-Darwin systems

comment:10 Changed 16 months ago by ryandesign (Ryan Schmidt)

In 70b5022538b6d4c87e2d2adcd55c9cba2fc9ebbb/macports-ports (master):

xxdiff: Use qt5 on non-Darwin systems

See: #58653

comment:11 Changed 16 months ago by RJVB (René Bertin)

AFAIK the qt4 error comes from the Qt4 PortGroup, why not fix it there rather than introduce the same code everywhere? The Qt4 PG would still need to be fixed because of all the ports that don't have a Qt5 variant (e.g. the KDE4 ports).

comment:12 Changed 16 months ago by mojca (Mojca Miklavec)

I agree that we should fix the Qt4 PortGroup to not raise a parse error. I also realized that we probably have a global problem of using ${os.major} checks all over the place to do some conditional checks on macOS version number, and I assume this would also affect Linux in strange ways. If a port only works on 10.13 and newer, the "if" statement checking for ${os.major} being high enough would probably evaluate to false on Linux.

comment:13 Changed 16 months ago by RJVB (René Bertin)

Yes, IIRC os.major resolves to the kernel major version on Linux, i.e. probably mostly 4 nowadays. That's mostly a problem once you actually start using MacPorts on Linux; with a few exceptions there is no link between kernel version and userland (libraries) from the pov. of ports.

As a general principle ports should throw errors only in the pre-fetch phase; this also helps prevent issues during portindex.

Note: See TracTickets for help on using tickets.