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.
Change History
comment:3 Changed 7 years ago by markd@…
- Summary changed from port upgraded outdated message when no outdated ports is confusing to BUG: port upgraded outdated message when no outdated ports is confusing
comment:5 Changed 6 years ago by jmpp@…
- Type changed from defect to enhancement
- Milestone changed from MacPorts 1.4 to MacPorts 1.5
Tentatively setting this to the 1.5 milestone, 1.4 is for the most part frozen. James, think you can work on it in due time? On second thought, a 1.4.x minor release could also be a possibility, if a fix is available.
-jmpp
comment:6 Changed 6 years ago by jberry@…
- Status changed from assigned to closed
- Resolution set to fixed
Resolved in r23390.
Present a cleaner message for port installed and port outdated when the list of ports has been restricted. In these cases we now say 'none of the specified ports are outdated/installed' instead of 'no ports are installed/outdated.'


I committed a partial fix (r19665), by adding an extra note about this situation. It's not perfect, but perhaps it's better. I'll leave the bug open hoping for time to get the extra fix in.