It uses a simple rules without the need to use complex regexes. It is
not as powerful as the existing approaches so both are complementary.
For example, this:
foo/bar (.*)app-crypt/pinentry(.*)\[gtk\] \1app-crypt/pinentry-gtk2\2
expresses the intention that can be expressed simpler:
rewrite foo/bar from-dep=app-crypt/pinentry to-dep=app-crypt/pinentry-gtk2 if-dep-has-use=gtk drop-use=gtk
Previously it has a dict with complex key (with the need to pack and
unpack it in places where it was used), and data was both part of the
keys and values.
It had the small advantage of removing duplicates, but changes for them
are very low and they are harmless anyway.
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
Entropy preserved libs handling code did not check all the followed symlink
before removing them. This causes the deletion of unexpected libraries during the
removal of packages. For example, app-emulation/vmware-workstation contains
the following symlink:
(A) /opt/vmware/lib/vmware/lib/libssl.so.1.0.1/libssl.so.1.0.1 -> (B) /usr/lib64/libssl.so.1.0.1
Upon removal of vmware-workstation, A is garbage collected and deleted,
if it's a symlink, the link is followed and (B) is removed as well, without
validating the action (i.e. checking if a package is still owning (B).)
This commit fixes this. See Sabayon bug #5812.
Traceback (most recent call last):
File "/usr/lib64/python3.4/base64.py", line 519, in _input_type_check
m = memoryview(s)
TypeError: memoryview: str object does not have the buffer interface
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/bin/equo", line 15, in <module>
main()
File "/usr/lib/entropy/client/solo/main.py", line 332, in main
exit_st = func(*func_args)
File "/usr/lib/entropy/client/solo/commands/command.py", line 406, in _call_exclusive
return func(client)
File "/usr/lib/entropy/client/solo/commands/update.py", line 115, in _update
rc = self._normal_update(entropy_client)
File "/usr/lib/entropy/client/solo/commands/update.py", line 236, in _normal_update
rc = repo_intf.sync()
File "/usr/lib/entropy/lib/entropy/client/interfaces/repository.py", line 327, in sync
rc = self._run_sync()
File "/usr/lib/entropy/lib/entropy/client/interfaces/repository.py", line 146, in _run_sync
self._entropy, repo, self.force, self._gpg_feature)
File "/usr/lib/entropy/lib/entropy/client/interfaces/db.py", line 2764, in update
return updater.update()
File "/usr/lib/entropy/lib/entropy/client/interfaces/db.py", line 2029, in update
selected = self._select_database_mirror()
File "/usr/lib/entropy/lib/entropy/client/interfaces/db.py", line 428, in _select_database_mirror
https_validate_cert = https_validate_cert)
File "/usr/lib/entropy/lib/entropy/client/interfaces/db.py", line 1992, in _remote_revision
fetch_rc = fetcher.download()
File "/usr/lib/entropy/lib/entropy/fetchers.py", line 391, in download
status = downloader()
File "/usr/lib/entropy/lib/entropy/fetchers.py", line 600, in _urllib_download
self.__http_basic_user, self.__http_basic_pwd)).replace('\n', '')
File "/usr/lib64/python3.4/base64.py", line 548, in encodestring
return encodebytes(s)
File "/usr/lib64/python3.4/base64.py", line 536, in encodebytes
_input_type_check(s)
File "/usr/lib64/python3.4/base64.py", line 522, in _input_type_check
raise TypeError(msg) from err
TypeError: expected bytes-like object, not str