Ticket #10766 (closed enhancement: fixed)
BUG: port upgraded outdated message when no outdated ports is confusing
| Reported by: | mstevens@… | Owned by: | jberry@… |
|---|---|---|---|
| Priority: | Low | Milestone: | MacPorts 1.4 |
| Component: | base | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Port: |
Description
port upgrade outdated shows:
> sudo port upgrade outdated
Can't map the URL 'file://.' to a port description file (Could not find Portfile in .). Please verify that the directory and portfile syntax are correct.
Error: To use the current port, you must be in a port's directory
Error: No port found.
When there are no outdated ports. This is very confusing.
From James Berry:
I'll try to fix it before too long. If you could file a bug against it, that would be great. I think the easiest fix is to improve the wording of the error message to be more clear about what happened: basically, when the pseudo-port "outdated" expands to no ports, then the upgrade action (and many others) tries to use the port in the current directory. Since there is no port in the current directory, it gives the error about no ports.
As a more complex fix, we should somehow know the difference between no expression, and the case where we have an expression that evaluates to nothing: this would be the really right thing, but might be more difficult.

