Opened 2 years ago

Closed 2 years ago

#56161 closed enhancement (fixed)

Improve handling of dependencies with incorrect case

Reported by: ryandesign (Ryan Schmidt) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.4.99
Keywords: Cc: kurthindenburg (Kurt Hindenburg), jmroot (Joshua Root)
Port:

Description

An unintended consequence of preventing the use of unknown subports (#34619) is that this new error message is also now seen when a port specifies a dependency on another port with the wrong case, for example port:unixodbc when it should have been port:unixODBC.

Possible improvements to this situation would be to detect if the "wrong subport" is just a different case of the main port or of one of the subports, and if so, either

  1. silently correct the case,
  2. correct the case and print a warning that the case is wrong, or
  3. print an error that the case is wrong.

Before I fixed the saga port's unixODBC dependency case just now, I saw:

$ ~/macports/macports-infrastructure/jobs/port_binary_distributable.tcl -v saga
unixODBC does not have a subport 'unixodbc'
    while executing
"error "$portname does not have a subport '$supplied_subport'""
    (procedure "mportopen" line 64)
    invoked from within
"mportopen $portInfo(porturl) [list subport $portName] $variantInfo"
    (procedure "infoForPort" line 10)
    invoked from within
"infoForPort $aPort $variantInfo"
    (procedure "check_licenses" line 47)
    invoked from within
"check_licenses $portName [array get variantInfo] $verbose"
    invoked from within
"exit [check_licenses $portName [array get variantInfo] $verbose]"
    (file "/Users/rschmidt/macports/macports-infrastructure/jobs/port_binary_distributable.tcl" line 345)

But it's possible this is also just a bug in port_binary_distributable.tcl, like #55941.

Change History (3)

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Be careful what you wish for, I guess.

comment:2 Changed 2 years ago by jmroot (Joshua Root)

In 879cebfe71e719a0f552d92515a0e069038f2856/macports-infrastructure:

port_binary_distributable: use right subport case

See: #56161

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

Resolution: fixed
Status: newclosed

Thanks, it looks like that did fix both problems.

Note: See TracTickets for help on using tickets.