Jon Turney wrote:
On 27/09/2022 14:51, Christian Franke wrote:
Christian Franke wrote:
...
I made the false assumption that default_version=empty in
set_action() always implies that the default version is not
accessible. This is not the case for packages selected for
installation before chooser is visible.
I'm working on a new fix for the "Ctrl+I pressed but current version
is not accessible" case. ...
See attached patch. It also fixes the same problem for the "Category"
view. Testing shows that the problem only affects the display of the
version number as the solver later silently removes such install
requests.
The correct logic is already in toggle_action(): Install the most
recent accessible non-test ('naively_preferred') version.
I dropped this idea and aligned Ctrl+I behavior with "Install" from
"Category" view instead. Toggle_action() behaves different in such
corner cases as it always installs something.
Thanks, I applied both patches.
Do you have a simple way of causing a non-accessible package for
testing with?
Unfortunately there is only a simple one if the current installation and
cache directory matches some conditions. The "Ignore install requests if
version is not accessible" case appears if:
- "Install from Local Directory" is selected.
- A previous version of a no longer installed package is still in the
cache directory. Otherwise the package would not appear in the chooser.
- The current version of this package is not in the cache directory. The
"Size" column shows "?" for such packages.
Without commit 63a2c90, Ctrl+I or "Install" from "Category" view shows
an empty version in "New" column. The "Install" from "Category" case
could also be reproduced with setup 2.919.
With this commit, the Install request does nothing.