Commit Graph

1433 Commits

Author SHA1 Message Date
Sławomir Nizio
cbcbf7495f [entropy.core] implement "drop all USE" in the new dep. rewrite 2018-02-24 19:52:12 +01:00
Sławomir Nizio
0a56ec74b8 [entropy.core,entropy.server] implement new dep. rewrite parser
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
2018-02-24 19:35:44 +01:00
Sławomir Nizio
9e3f45f4c3 [entropy.server] simplify data container for dep_rewrite
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.
2018-02-24 18:49:43 +01:00
Sławomir Nizio
7635fb6d3b [entropy.server] create a simple abstration/interface for dep. rewrite 2018-02-24 18:47:29 +01:00
Fabio Erculiani
8d0f16d9d5 Release Entropy 310 2017-10-08 22:25:58 +02:00
Fabio Erculiani
2d65d5b7bf [entropy.client] fix conflicts removal handling during upgrade.
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
2017-10-08 21:51:07 +02:00
Fabio Erculiani
330ffd1926 Release Entropy 309 2017-09-10 19:08:33 +02:00
Francesco Ferro
cac8ad2b29 Release Entropy 308 2017-09-09 18:46:39 +02:00
Francesco Ferro
19a7a54dda [entropy.core] Remove nested function for natural sorting 2017-09-09 11:46:06 +02:00
Francesco Ferro
afbce1c169 [entropy.core] update tests for entropy tag sorting 2017-09-09 11:46:06 +02:00
Francesco Ferro
79e1bec57f [entropy.core] fix tags natural sorting issue
This commit will add a key generator that creates an array
from the original string where each group of numbers is
converted to a number.
2017-09-09 11:46:06 +02:00
Fabio Erculiani
c726b3d694 Merge pull request #34 from geaaru/basic_python3_4
Fix issue on use basic authentication with python3.4:
2017-05-14 18:29:16 +02:00
Fabio Erculiani
b2d0ca8707 Release Entropy 307 2017-05-13 14:36:24 +02:00
Fabio Erculiani
345d31b3c5 [entropy.client] Fix accidental deletion of preserved libs when still in use.
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.
2017-05-13 14:25:01 +02:00
Geaaru
aa32d22d63 Fix issue on use basic authentication with python3.4:
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
2017-04-29 15:31:32 +02:00
Fabio Erculiani
c611f76a33 Release Entropy 306 2016-11-20 08:07:36 +01:00
Fabio Erculiani
b95b0d80b4 Release Entropy 305 2016-11-19 21:16:27 +01:00
mudler
4a0488bd41 Release Entropy 304 2016-09-18 16:54:55 +02:00
Fabio Erculiani
b8007c3445 Merge pull request #23 from rdnetto/bugfix_read_settings
[entropy.core] _system_parser: Actually read the file
2016-08-30 20:19:46 +02:00
Fabio Erculiani
abde25f918 Merge pull request #31 from Enlik/conflict-print-revdeps
[solo.commands,lib] display packages that pull in conflicting ones
2016-08-30 20:17:35 +02:00
Sławomir Nizio
706d6bca55 [solo.commands,lib] improve message about conflicted packages
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.
2016-08-06 20:55:33 +02:00
Sławomir Nizio
e96db09ad7 [solo.commands,lib] display packages that pull in conflicting ones 2016-08-05 20:00:21 +02:00
Sławomir Nizio
12a7bdd2be [entropy.client,conf] avoid "Argument list too long" 2016-08-02 09:04:50 +02:00
Fabio Erculiani
aeaf05fe4d Release Entropy 303 2016-07-08 09:04:30 +02:00
Fabio Erculiani
9097421320 [entropy.services.client] fix SSL certs validation when Python 2.7.9+ is in use 2016-07-08 09:03:54 +02:00
mudler
2ab2130714 Release Entropy 302 2016-05-16 22:22:26 +02:00
Fabio Erculiani
f935b1821f Merge pull request #26 from mudler/master
[entropy.tools] add IA_64 to elf_class_strtoint
2016-05-14 12:00:39 +02:00
mudler
67a645fabe [entropy.tools] add IA_64 to elf_class_strtoint 2016-05-14 11:49:37 +02:00
Sławomir Nizio
97a99edbf3 [entropy.tools] correct read_elf_broken_symbols
ldd (now?) prints this to stdout; read from both streams.
2016-04-15 00:21:53 +02:00
Sławomir Nizio
d9843c2d1d [tests] enforce default caching policy
When ran in a chroot in environment where entropy.tools.total_memory()
would return 0, the test failed.
2016-04-14 22:38:14 +02:00
Reuben D'Netto
c530299fb5 [entropy.core] _system_parser: Actually read the file
Fixed bug introduced in: a2315b1 [entropy.core] _system_parser: drop access() usage

This ensures that /etc/entropy/entropy.conf is read, instead of being
ignored.
2016-04-06 21:57:06 +10:00
Fabio Erculiani
96ed6d3c5e Release Entropy 301 2016-03-20 19:32:33 +01:00
mudler
3ff54e824f [entropy.tools] add PPC to elf_class_strtoint 2016-01-21 16:28:29 +01:00
Ettore Di Giacinto
a20db47d82 [entropy.tools] add MIPS to elf_class_strtoint 2015-11-28 15:50:28 +01:00
Fabio Erculiani
5ea91aefd7 Release Entropy 300 2015-10-29 19:03:36 +01:00
Fabio Erculiani
09ed451247 [entropy.core.settings.base] fix call to .write() 2015-10-29 19:03:15 +01:00
Fabio Erculiani
baa30318e1 Release Entropy 299 2015-10-29 18:54:00 +01:00
Fabio Erculiani
6f061406c1 [entropy.core.settings.base] fix tuple index when value is NoneType 2015-10-29 18:53:09 +01:00
Fabio Erculiani
da39ba3ad9 Release Entropy 298 2015-08-22 23:49:00 +01:00
Sławomir Nizio
bfe8b9951c [entropy.tools] add AARCH64 to elf_class_strtoint 2015-08-11 22:10:37 +02:00
Fabio Erculiani
460adbe92f Merge pull request #13 from geaaru/basic_ssl
Add support to Basic Authentication and permit disable of SSL certificate validation
2015-06-06 13:52:58 +01:00
Geaaru
38d03dc200 Add support to Basic Authentication and permit disable of SSL certificate validation on https protocol 2015-06-05 15:37:22 +02:00
Fabio Erculiani
dd2e9560a3 Release Entropy 297 2015-06-03 06:50:08 +01:00
Sławomir Nizio
d2273933e9 [entropy.tools] add more arches to elf_class_strtoint 2015-05-27 20:20:01 +02:00
Fabio Erculiani
1e83c54741 Release Entropy 296 2015-03-17 16:16:54 +00:00
Fabio Erculiani
39884e2a6a [entropy.tools] add support for "ARM" in elf_class_strtoint 2015-03-17 16:16:05 +00:00
Fabio Erculiani
c875341fa5 Release Entropy 295 2015-01-13 10:19:05 +00:00
Fabio Erculiani
0baa8ffedc Release Entropy 294 2015-01-10 07:33:45 +00:00
Fabio Erculiani
4e0232f22e Release Entropy 293 2014-11-30 14:57:24 +00:00
Fabio Erculiani
12d01a9465 [entropy.server] fix typo in list comprehension 2014-11-30 14:54:38 +00:00