Opened 13 years ago

Closed 4 months ago

Last modified 4 months ago

#33820 closed enhancement (fixed)

base: add ui_msg to output outdated ports during selfupdate

Reported by: seanfarley (Sean Farley) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.10.0
Component: base Version: 2.0.4
Keywords: haspatch Cc: cooljeanius (Eric Gallager), raimue (Rainer Müller)
Port:

Description

This is a small tweak to macports base that will output the outdated ports after showing the message:

"The ports tree has been updated. To upgrade your installed ports, you should run

port upgrade outdated"

Attachments (1)

base-outdated.patch (906 bytes) - added by seanfarley (Sean Farley) 13 years ago.

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by seanfarley (Sean Farley)

Attachment: base-outdated.patch added

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

comment:2 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:3 Changed 12 years ago by cooljeanius (Eric Gallager)

This should probably only be printed when the verbosity level is at least the -v flag or higher.

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

Cc: raimue@… added

In my opinion, I don't think it's necessary to list outdated ports on selfupdate.

Anyway, on technical details, using exec is not the right choice here. The package macports1.0 is meant as a library to be used by different clients, most notable port/port.tcl and the MacPorts.framework for GUI applications. We cannot always expect port to be in PATH for GUI applications, so at least it would have to be ${prefix}/bin/port. It would make more sense to add such a message within the port cli client, as a GUI client has other options to present outdated ports than plain text messages. Additionally, the behavior and output from selfupdate and sync should be consistent.

comment:5 in reply to:  4 Changed 12 years ago by seanfarley (Sean Farley)

Replying to raimue@…:

In my opinion, I don't think it's necessary to list outdated ports on self update.

I dunno; I could see it either way. On one hand, it's nice to have a list of outdated ports after running port sync or port selfupdate.

Anyway, on technical details, using exec is not the right choice here. The package macports1.0 is meant as a library to be used by different clients, most notable port/port.tcl and the MacPorts.framework for GUI applications. We cannot always expect port to be in PATH for GUI applications, so at least it would have to be ${prefix}/bin/port. It would make more sense to add such a message within the port cli client, as a GUI client has other options to present outdated ports than plain text messages. Additionally, the behavior and output from selfupdate and sync should be consistent.

Very true; this patch was mostly meant as a proof-of-concept.

comment:6 Changed 4 months ago by Xavier Hsinyuan <me@…>

Resolution: fixed
Status: newclosed

In 4ae6d9826afeaa3ce008459fa99cab37b8060723/macports-base (master):

selfupdate: report number of outdated ports

Change the updatestatusvar into a dict, and return extra status
information in it: whether the ports tree was synced, and whether
portindex still needs to be run. Use this information to print messages
referring to port(1) commands in action_selfupdate instead of in
selfupdate::main, where they may not have been appropriate if using a
different client.

Closes: #33820

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

Milestone: MacPorts Future

comment:8 Changed 4 months ago by jmroot (Joshua Root)

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