For convenience (seemingly, and it really is convenient) equo and other
tools can be run from the checkout, and Entropy modules are loaded from
the checkout. Now there is a strict separation when system paths and
when paths from the checkout are used.
It makes it a bit more robust, secure and preditable at the cost of
a little more complexity.
A pleasant side effect of this change is that it is not required to
change directory to the tool (to use non-system one), as paths in the
checkout are relative to scripts.
Imports in lib/tests were not adjusted.
- Variable entropy_client was not available where it was used.
- Module entropy.dep was not imported but was used. It worked as
the module was imported from another place, but it is better to
import it explicitly.
Suggested by Ettore.
My comment is that it is to have a more correct information and to give
credit where it is due.
This is not a "miscredit" towards the Creator. We know who has made this
possible!
Examples of scenarios that are fixed:
- "package was installed by user" information was lost on package p1
when p1 was pulled as update on "equo install p2";
- update was saving all packages as installed by user.
In certain extreme situations, that are more likely if the install
state is old (e.g. 9 months +), Entropy may decide to remove packages
due to conflicts with the version being installed and shoot itself
in the foot, if this is the case of dev-lang/python :-).
So, this commit tries to avoid the scenario by filtering out package
removals for those that are being installed anyway as part of the
transaction (e.g. a system upgrade).
This should fix the very specific case, but increase uncertainty
and thus entropy in other cases where once a package that lists
conflicts is installed, it may not expect to find that package
installed. However, this case should be handled by the dependency
graph generator (and it currently does not), which would need to
reorder the execution of the queue to comply with conflicts.
Perhaps, someone in the future will improve that too, for now,
let's enjoy one more snowflake.
Current improvement:
- foo-1 and bar-2 are set to be installed
- foo-1 conflicts with <bar-2
- bar-1 is installed
- foo-1 wanted to remove bar-1 as part of foo-1 install transaction.
(now fixed, it won't...)
- bar-2 is then installed
Better improvement:
- foo-1 and bar-2 are set to be installed
- foo-1 conflicts with <bar-2 (but bar-2 itself can be installed
and does not conflict with foo-1)
- bar-2 is set to be installed before foo-1
- when entropy gets to foo-1 there is nothing to remove
This fixes a bug where certain tab completions would be met with lots
of sed errors.
It is also faster since it uses 1 less sed process.
Additionally it will also show 'no matches' if there are no
matches found for a command completion, instead of showing
a suggestion to add 1st level commands on.
Before: equo X (no cmds left to add)
zsh suggests install, query, remove etc.
Now it will properly say there are not more suggestions
for most of the $1 terms
Don't show the package itself. If there are no revdeps, nothing would be
shown so a custom "(no reverse dependencies)" message will appear, which
is clearer.
- correct negated logic in EPIPE hanling
- correct ENOSPC handling (it's IOError, but OSError was catched)
- support Python 3.3+ which got reworked exceptions