Opened 14 years ago

Closed 14 years ago

#8723 closed enhancement (fixed)

RFE: 'port oudated' should provide different output when no outdated ports

Reported by: jpm@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.2
Keywords: Cc:
Port:

Description (last modified by jberry@…)

it would be nice to provide alternate message when there are not any outdated ports.

jpm.giant-squid ~ -=> port version Version: 1.211 jpm.giant-squid ~ -=> port outdated The following installed ports are outdated: jpm.giant-squid ~ -=>

looking at darwinports/base/src/port/port.tcl from cvs, it appears as though it already has this capability. but even after installing from cvs i still get the string "The following installed ports are outdated:" when i do not have any outdated ports.

proc action_outdated { action portlist opts } {

[...] if { [llength $ilist] > 0 } {

puts "The following installed ports are outdated:" [...]

} else {

puts "No installed ports are outdated."

}

return $status

}

Attachments (1)

port.tcl.diff (1.1 KB) - added by jpm@… 14 years ago.
diff that fixes the errant message being printed

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by jpm@…

Attachment: port.tcl.diff added

diff that fixes the errant message being printed

comment:1 Changed 14 years ago by jpm@…

okay, i think i know what is happening here - i believe the conditional is checking for something other than what the printed strings is indicating.

$ilist actually contains the list of installed ports (or just the individual ports if the user has specificed them in the outdated command), it does not contain a pruned list indicating the outdated. so that means, unless there aren't any ports installed, then the message

"The following installed ports are outdated:"

will always be printed.

comment:2 Changed 14 years ago by jpm@…

i comandeered a machine that had 1.200 installed and tested the patch out and it seems to be working as expected. i'm sure it could use a beautification pass but functionally it seems to be okay.

here is some lovely terminal spew of my quick test:

jpm.freemason ~ -=> port outdated The following installed ports are outdated: jpm.freemason ~ -=> ./port outdated No installed ports are outdated. jpm.freemason ~ -=> sudo port selfupdate DarwinPorts base version 1.200 installed Downloaded DarwinPorts base version 1.211 Configuring, Building and Installing new DarwinPorts base selfupdate done! jpm.freemason ~ -=> port outdated The following installed ports are outdated: apr 1.2.2_0 < 1.2.6_0 apr-util 1.2.2_1 < 1.2.6_0 subversion 1.3.0_2 < 1.3.1_0 jpm.freemason ~ -=> ./port outdated The following installed ports are outdated: apr 1.2.2_0 < 1.2.6_0 apr-util 1.2.2_1 < 1.2.6_0 subversion 1.3.0_2 < 1.3.1_0 jpm.freemason ~ -=> sudo port upgrade outdated [...] jpm.freemason ~ -=> port outdated The following installed ports are outdated: jpm.freemason ~ -=> ./port outdated No installed ports are outdated. jpm.freemason ~ -=>

comment:3 Changed 14 years ago by jpm@…

Summary: port oudated should provide different output when no outdated portsBUG port oudated should provide different output when no outdated ports

comment:4 Changed 14 years ago by markd@…

Summary: BUG port oudated should provide different output when no outdated portsRFE: 'port oudated' should provide different output when no outdated ports
Type: defectenhancement

comment:5 Changed 14 years ago by jberry@…

Description: modified (diff)
Resolution: fixed
Status: newclosed

Committed change. Thanks for the patch.

Note: See TracTickets for help on using tickets.