Opened 8 years ago

Closed 7 months ago

Last modified 5 months ago

#50518 closed defect (fixed)

bug: case sensitive port names in boolean expressions

Reported by: mojca (Mojca Miklavec) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone: MacPorts 2.9.0
Component: base Version: 2.3.4
Keywords: Cc: ionic, ryandesign (Ryan Carsten Schmidt)
Port:

Description

The following doesn't work properly:

> sudo port upgrade outdated and not filezilla
--->  Computing dependencies for FileZilla
...

Change History (11)

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

Summary: bug: case sensitive port names in 'port upgrade'bug: case sensitive port names in boolean expressions

comment:2 Changed 6 years ago by Ionic (Mihai Moldovan)

Cc: ionic added

Also happens the other way around - in case that a port has been renamed in a case-only way and a boolean expression is added (correctly-cased, incidentally), the implicit part is buggy.

See #55241 for a more detailed description.

Concise description: mediainfo was renamed to MediaInfo, port outdated and port echo outdated both listed it, but port upgrade outdated and not GitX or port echo outdated and not GitX would not upgrade/list it.

Interesting side fact: port outdated and not GitX does list the affected mediainfo port, though that may be "questionable usage of boolean expressions" (since outdated in this context is a command).

Last edited 6 years ago by Ionic (Mihai Moldovan) (previous) (diff)

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

Milestone: MacPorts 2.5.0
Owner: changed from macports-tickets@… to neverpanic
Status: newaccepted

Can reproduce with XviD installed and the commands

$> port installed installed and not XviD
$> port installed installed and not xvid

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

Cc: ryandesign added

comment:5 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Does anybody know where in MacPorts base these Boolean expressions are handled? Trying to search base for "and" or "or" has been pretty futile.

comment:6 Changed 6 years ago by raimue (Rainer Müller)

The code is in the port client. You are looking for andExpr and orExpr, which then use the opIntersection and opComplement operations on the port list. https://github.com/macports/macports-base/blob/ec4ae2dc3d0f736c3c247fcf83e33f87223fad2f/src/port/port.tcl#L1106

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

Milestone: MacPorts 2.5.0MacPorts 2.6.0

comment:8 Changed 5 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.6.0MacPorts 2.7.0

Ticket retargeted after milestone closed

comment:9 Changed 3 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.7.0MacPorts Future

Ticket retargeted after milestone closed

comment:10 Changed 7 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: acceptedclosed

In bd02a2fba3ec2d10972bf02512e999a1662f92d3/macports-base (master):

Compare normalised port names in boolean ops

Fixes: #50518

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

Milestone: MacPorts FutureMacPorts 2.9.0
Note: See TracTickets for help on using tickets.