Commit Graph

1448 Commits

Author SHA1 Message Date
Sławomir Nizio 4463b6d425 [entropy.spm] add support for BDEPEND (from EAPI 7)
For the purpose of Entropy binary packages, they are merged with
DEPEND.
2018-08-17 23:51:40 +02:00
Ettore Di Giacinto a762d43bdc Revert "inject: fix store of content with utf-8 chars" 2018-08-11 16:13:54 +02:00
Sławomir Nizio 8643db23aa [entropy.tools, tests] fix test and code with Python 3; add to CI 2018-08-06 09:37:13 +02:00
Sławomir Nizio fabb3e72da [tests] add lib/tests/run-nonpriv-wrapper
- runs as non-root
- does not require being in entropy/portage group
    - in fact, it's better (better isolation) to run as such
- thus does not modify running system

The wrapper script is ugly but very convenient.
2018-08-05 00:40:11 +02:00
Sławomir Nizio 779d40389f [tests] exit with failure also on assetion errors 2018-08-04 23:45:12 +02:00
Ettore Di Giacinto 686f7e3ebc Merge pull request #50 from Enlik/equo-mark
[solo.commands.mark] new command
2018-08-04 23:00:31 +02:00
Geaaru b9580f8244 inject: fix store of content with utf-8 chars 2018-08-04 21:09:42 +02:00
Ettore Di Giacinto 36b698b74b Merge pull request #49 from Enlik/spm-by-user
[solo.commands.rescue] use world file to replicate by-user status
2018-08-04 19:55:53 +02:00
Sławomir Nizio 85174d39fa add .travis.yml
USERNAME is needed in lib/entropy/security.py.
Added support for ETP_TESTS_NONINTERACTIVE (and skipped one test).
2018-08-04 19:05:19 +02:00
Sławomir Nizio 70f1719138 [solo.commands.mark] new command 2018-07-31 08:58:31 +02:00
Sławomir Nizio e5db0d6b6e [solo.commands.rescue] use world file to replicate by-user status
Uses the newly introduced function in spm: get_user_selected_packages.
2018-07-30 08:49:17 +02:00
Sławomir Nizio 77a5071cf5 [entropy.spm] factor out __add_update_world_file 2018-07-30 00:11:29 +02:00
Ettore Di Giacinto 9e427b7c9b Release Entropy 312 2018-07-11 18:10:19 +02:00
Geaaru b253340b64 Fix injection of packages with directory with spaces 2018-06-25 17:04:31 +02:00
Ettore Di Giacinto 1d6fde589e Release Entropy 311 2018-05-30 22:13:29 +02:00
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