"port upgrade" error message usability

Thomas R. Murphy trm70 at case.edu
Sun Jan 30 16:16:57 UTC 2022


 From a general usability and documentation standpoint (without 
attention beyond the average user, as confronting that error seems to be 
from the other conversation), the MacPorts Guide addresses this quite well:

  * https://guide.macports.org/#using.common-tasks.upgrading
  * https://guide.macports.org/#using.port.upgrade

The guide has been indispensable in easily creating my regular install 
maintenance scripts and workflows.

Thomas R. Murphy (thomas.russell.murphy at case.edu, trm70 at case.edu)
GPG Key ID: 959D48BF
On 2022-01-30 02:24:40, Andrew Janke wrote:
> Hi, MacPorts developers,
>
> Long-time Homebrew user and recent MacPorts convert here.
>
> Minor usability issue with the `port` program, I think: I suspect that 
> a common operation for regular MacPorts users to do is "upgrade all my 
> stuff to the latest version".
>
> I tried doing this with `port selfupdate`; `port upgrade`, and got 
> this error message:
>
> [~] $ sudo port selfupdate
> --->  Updating MacPorts base sources using rsync
> MacPorts base version 2.7.1 installed,
> MacPorts base version 2.7.1 downloaded.
> --->  Updating the ports tree
> --->  MacPorts base is already the latest version
>
> The ports tree has been updated. To upgrade your installed ports, you 
> should run
>   port upgrade outdated
> [~] $ sudo port upgrade
> Can't map the URL 'file://.' to a port description file ("Could not 
> find Portfile in /Users/janke").
> Please verify that the directory and portfile syntax are correct.
> To use the current port, you must be in a port's directory.
> [~] $
>
> I'm a dev with 25 years of coding and sysadmin experience, and I don't 
> know what to do with that error message. I dunno what a regular user 
> is supposed to do with that. (Yes, I saw the "To upgrade your 
> installed ports" output from the selfupdate command, but still.)
>
> Maybe the error message here could be modified to include a "maybe you 
> meant `port upgrade outdated`" message or something like that? Where's 
> the 'file://'" coming from, anyway? Does `port upgrade` operate on 
> some port definition found in the current working directory by 
> default? I did not provide a URL as an input to the `port upgrade` 
> command, so it's a little unexpected that I got an error complaining 
> about a URL here.
>
> Cheers,
> Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220130/ba537ee4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220130/ba537ee4/attachment.sig>


More information about the macports-dev mailing list