11577 Commits

Author SHA1 Message Date
Ettore Di Giacinto
c56c1eb446 Tagging Entropy version 324 324 2020-02-07 16:25:44 +01:00
Ettore Di Giacinto
23f2e55879 Release Entropy 324 2020-02-07 16:25:39 +01:00
geaaru
5d58a8c501 Merge pull request #87 from geaaru/master
Fix retrieve of kernel list when virtual/linux-binary contains RDEPEND with OR
2020-02-04 13:53:14 +01:00
Daniele Rondina
4649660050 kswitch: Added a new way to retrieve list of kernels
Added a new way to retrieve list of kernel available
that uses directory /etc/kernels/availables/{sabayon,sabayon-lts}.
If this directory is present is not used current logic for
retrieve the list of kernel.

Under /etc/kernels/avaiables/ directory files with 'lts' extension
are used for retrieve list of LTS kernels.

An user could return his kernel list just if he creates and
maintains his file in a similar format:

$# cat /etc/kernel/availables/mykernel
sys-kernel/linux-sabayon:4.9
sys-kernel/linux-mykernel:4.4

This logic now is used as an additional feature after retrieve
the existing kernels based on virtual/linux-binary or
virtual/linux-binary-lts.
2020-02-04 13:40:03 +01:00
Daniele Rondina
c9b1daece1 kswitch: Fix parsing of kernel list
Now virtual/linux-binary and virtual/linux-binary-lts have
kernel list in OR. So we need retrieve the list and split
result string by ';'.
2020-02-04 13:38:23 +01:00
Geaaru
5aec1b48e5 [kernel-switcher] Refactor 2020-01-24 23:23:07 +01:00
Sławomir Nizio
08da648a20 [entropy.client] fixes for "dictionary changed size during iteration" 2019-12-18 22:20:29 +01:00
Ettore Di Giacinto
47fc1e9f9a Tagging Entropy version 323 323 2019-12-16 23:38:50 +01:00
Ettore Di Giacinto
285876cc86 Release Entropy 323 2019-12-16 23:38:39 +01:00
Enlik
31c8df4017 Merge pull request #86 from Enlik/moar-py3
More Python 3 fixes
2019-12-14 00:07:53 +01:00
Sławomir Nizio
bad4b21f1a [entropy.client.misc, entropy.output] fixes for Python 3
ConfigurationFiles._load_maybe_add (equo.client.misc): path is in bytes here

_std_write (entropy.output): fixes crash in equo conf update with "Replace
original with update" when there is an error in which case msg can be bytes:

  File ".../entropy/lib/entropy/tools.py", line 687, in movefile
    print_generic("!!! Failed to move", src, "to", dest)
  File ".../entropy/lib/entropy/output.py", line 596, in print_generic
    _std_write(msg, stderr = stderr)
  File ".../entropy/lib/entropy/output.py", line 493, in _std_write
    obj.write(msg)
2019-12-13 21:06:23 +01:00
Sławomir Nizio
2aa2c69e2b correct exception handling / error reporting with Python 3 2019-12-13 01:32:09 +01:00
Sławomir Nizio
4ab520925a [entropy.output] fix for Python 3 in input_box()
myresult = readtext(input_text+": ", password = password).decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
2019-12-11 22:54:00 +01:00
Sławomir Nizio
7abd4dad80 [entropy.qa] fix test_shared_objects() with Python 3
Other parts of this function and called ones work or can work with
strings.
2019-12-06 01:04:04 +01:00
Sławomir Nizio
d65f09fcf8 [rigo] correct Vte.Terminal.feed with Python 3
With Python 3, prepare_markup() doesn't now convert string to bytes.
2019-12-05 23:28:27 +01:00
Sławomir Nizio
842979cbba [magneto, rigo] Python 3 fixes in _dbus_to_string 2019-12-05 22:41:53 +01:00
Sławomir Nizio
e2de60dbc3 [entropy.client.services] Python 3 fix 2019-12-05 22:36:09 +01:00
Sławomir Nizio
97409d12d5 [rigo] Python 3 fixes 2019-12-05 22:34:42 +01:00
Sławomir Nizio
e26d11b5f6 Python 3 fixes: open() and so, not file() 2019-12-04 22:01:22 +01:00
Enlik
952eefa4c6 Merge pull request #85 from Enlik/dirchiter
[entropy.server] correct close_repositories() with Python 3
2019-11-29 00:46:04 +01:00
Sławomir Nizio
fc13fa3727 [entropy.server] correct close_repositories() with Python 3
Function callers, in order (during eit commit):

1. filename='lib/entropy/server/interfaces/main.py', function='switch_default_repository', code_context=[' self.close_repositories()\n'], index=0)
2. filename='server/eit/commands/command.py', function='_call_exclusive', code_context=[' server.close_repositories()\n'], index=0)
3. filename='lib/entropy/client/interfaces/client.py', function='destroy', code_context=[' self.close_repositories(mask_clear = False)\n'], index=0)
4. filename='lib/entropy/server/interfaces/main.py', function='destroy', code_context=[' self.close_repositories()\n'], index=0)

Third one triggers packages set synchronization (which would cause "dictionary
changed size during iteration"), and marks sets as being synchronized.

Fourth does not trigger sets synchronization, so closes all repositories
without new ones being opened in the meantime.

Side note:
It's similar to this in "client," lib/entropy/client/interfaces/methods.py:

    def close_repositories(self, mask_clear = True):
	...
            # list() -> python3 support
            for item, val in list(repo_cache.items()):
		...
		repo_cache.pop(item).close(_token = repository_id)
		...

but (based on shallow look), it doesn't do as much magic; just calls .pop()
(not sure if there are similar side effects in close() there, though), so the
explanation may possibly apply to the lib/entropy/server function only.
2019-11-14 01:16:17 +01:00
Ettore Di Giacinto
1fa4045ced Tagging Entropy version 322 322 2019-11-10 15:53:56 +01:00
Ettore Di Giacinto
d2328561d9 Release Entropy 322 2019-11-10 15:53:52 +01:00
Ettore Di Giacinto
1d32745082 Merge pull request #83 from Enlik/py3-fixes
[entropy.client.misc] correct ConfigurationFiles with Python 3
2019-11-10 15:53:05 +01:00
Ettore Di Giacinto
cf50abb578 Merge pull request #82 from Enlik/qfile-no-plib
[entropy.spm] search_path_owners (qfile) fixes
2019-11-10 15:48:32 +01:00
Ettore Di Giacinto
15d2b3b217 Tagging Entropy version 321 321 2019-11-10 15:44:21 +01:00
Ettore Di Giacinto
00afcc3c10 Release Entropy 321 2019-11-10 15:44:18 +01:00
geaaru
d68f5debbd Merge pull request #84 from Enlik/rewriter-bugfix
[entropy.core] fix DependencyRewriter with or-dependencies
2019-11-09 17:01:55 +01:00
Sławomir Nizio
c6ab5d28e2 [entropy.core] fix DependencyRewriter with or-dependencies 2019-11-09 12:20:46 +01:00
Sławomir Nizio
6bdcd152c8 [entropy.client.misc] correct ConfigurationFiles with Python 3
1. Command to execute (diff) was getting arguments like b"path".
2. Crash when priting message.
3. In Python 3, b'x'[0] is int, not str, so a test (if) was (silently)
always true. This way, upon eit commit (at least) and with Python 3,
warning about not merged configuration files was newer printed.

(3) prevented prior discovery of (1) and (2).

Based on my checks, there are no more problems like (3), but I cannot
tell for sure.
2019-11-09 12:14:10 +01:00
Sławomir Nizio
7fc5bd3380 [entropy.spm] fix search_paths_owners (qfile) with Python 3 2019-11-08 01:19:01 +01:00
Sławomir Nizio
998cd2d755 [entropy.spm] adapt to qfile from portage-utils-0.81
[Not tagged so in their git repository... whatever.]

With -R / it prints bogus lines making Entropy crash:

  File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 748, in aux_get
    raise KeyError(mycpv)
KeyError: 'plib_registry:'

The change was done in portage-utils, commit f05c78008b1754a79e31e793a67d07ed8f5d11bc

    Make qfile also check the prune lib registry

and the problem with qfile was reported to Gentoo in bug 699558.

It will break with older qfile but Entropy should fallback to slower,
non-qfile code branch.
2019-11-07 23:17:28 +01:00
Ettore Di Giacinto
65c28deb2e Tagging Entropy version 320 320 2019-11-07 17:21:33 +01:00
Ettore Di Giacinto
f2cac41869 Release Entropy 320 2019-11-07 17:21:28 +01:00
geaaru
b55adfafe8 Merge pull request #79 from Enlik/qfile-no-e
[entropy.spm] adapt to qfile from portage-utils-0.80
2019-10-05 11:26:28 +02:00
Sławomir Nizio
54a3e50017 [entropy.spm] adapt to qfile from portage-utils-0.80
In 0.74 -e was available, and in 0.80 it is not present.
In both versions, and with the same set of options used, -e and -v
provide the same result so -v is now used to work on both.

Changed in portage-utils, commit 951a8711a59b1a7d49125f5f5214ff1ae9e50074:

    qfile: drop non-functional --exact option

    Bug: https://bugs.gentoo.org/678632
2019-10-02 02:01:07 +02:00
Enlik
d2c1bcd13b Merge pull request #76 from geaaru/fix-unused
unused: fix wrong variable reference
2019-08-18 21:27:49 +02:00
geaaru
67cde5ac5c Merge pull request #78 from geaaru/fix-utf8-issue
Handle unicode decode error as not text file - #77
2019-08-17 19:21:15 +02:00
Daniele Rondina
8647a8739d Handle unicode decode error as not text file - #77 2019-08-17 17:18:35 +02:00
Daniele Rondina
84ff779709 unused: Fix search with spm 2019-08-15 11:29:18 +02:00
geaaru
0b24448404 Merge pull request #75 from Enlik/completions
[solo.commands.command] simplify and improve bash completions
2019-07-18 16:39:53 +02:00
Sławomir Nizio
b2c8e2c819 [solo.commands.command] simplify and improve bash completions
Note: <tab> below can mean double <tab>.

This commit fixes cases such like the following ones:

* crash (issue !73) - e.g. KeyError: u'--mtime':
    - equo security oscheck --mtime <tab>
    - equo query graph --complete <tab>
      (this was due to a typo in variable name)

* now prints options, previously it didn't:
    - equo install -a <tab>

* crashed, or (with only variable name fixed) didn't print all options:
    - equo security oscheck --mtime <tab>
      (note that it worked with more special -q instead of --mtime etc.)

* didn't print all options:
    - equo query list installed <tab>
      (now shows also --by-user)

The following behaviour is still buggy:

* last typed word (note: no space before <tab>) disappears upon completion:
    - equo security oscheck<tab>
      (not a regression)
    - equo install --deep<tab>
      (here it's an option; regression! - previously it didn't complete but
      didn't cause the word to be erased either)

These can be corrected reliably when something like ${COMP_WORDS[COMP_CWORD]}
(from complete -F) is passed to the Python side.
Without this it's not possible to distinguish between `recognized_option<tab>`
(completion of recognized_option) and `recognized_option <tab>`.
2019-07-16 08:35:32 +02:00
geaaru
fa6068b2e4 Merge pull request #70 from geaaru/arm-iuse-fix
Fix handling IUSE with default options with Python 3
2019-07-12 22:42:29 +02:00
Geaaru
427bc90bc0 Process IUSE with default option correctly
On ARM environment injection of packages doesn't handle
correctly IUSE with default options (+)/(-) and this
doesn't expose correctly the USE flags of the package for dependencies
test.

Example:

  ╠  @@ Searching...
  ╠      @@ Package: app-arch/xz-utils-5.2.4-r2 branch: 5, [__system__]
  ╠          Category:        app-arch
  ╠          Name:            xz-utils
  ╠          Masked:          False
  ╠          Installed:       version: 5.2.4-r2 ~ tag: NoTag ~ revision:
  9999
  ╠          Slot:            0
  ╠          Size:            29.3kB
  ╠          Download:
  packages/armv7l/5/app-arch/app-arch:xz-utils-5.2.4-r2.efbac860e08851659458db1e4b55a03c3f3711e0.tbz2
  ╠          Checksum:        0
  ╠          SHA1:            efbac860e08851659458db1e4b55a03c3f3711e0
  ╠          SHA256:
  69989fb2f120539938b060531ba17e8cc2e2e3ed879ef937aacc5f2b9abcfc70
  ╠          GPG:             No
  ╠          ## Dependencies:
  ╠          ##               [3] >=app-portage/elt-patches-20170815
  ╠          ##               Legend:
  ╠          ##               {0} Runtime dependency
  ╠          ##               {1} Post dependency
  ╠          ##               {2} Manually added (by staff) dependency
  ╠          ##               {3} Build dependency
  ╠          ## Conflicts:
  ╠          ##               <app-arch/lzma-4.63
  ╠          ##               <app-arch/p7zip-4.57
  ╠          ##               app-arch/lzma-utils
  ╠          Homepage:        https://tukaani.org/xz/
  ╠          Description:     utils for managing LZMA compressed
  ╠                           files
  ╠          USE flags:       -+extra-filters -+threads -abi_mips_n32
  ╠                           -abi_mips_n64 -abi_mips_o32
  ╠                           -abi_ppc_32 -abi_ppc_64 -abi_s390_32
  ╠                           -abi_s390_64 -abi_x86_32 -abi_x86_64
  ╠                           -abi_x86_x32 -elibc_FreeBSD
  ╠                           -static-libs arm armv5te armv6
  ╠                           armv6t2 big-endian cpu_flags_arm_edsp
  ╠                           cpu_flags_arm_thumb cpu_flags_arm_thumb2
  ╠                           cpu_flags_arm_v4 cpu_flags_arm_v5
  ╠                           cpu_flags_arm_v6 cpu_flags_arm_v7
  ╠                           cpu_flags_arm_vfp elibc_glibc
  ╠                           kernel_linux nls userland_GNU

USE flags extra-filters and threads MUST in the format:

╠          USE flags:       -abi_mips_n32 -abi_mips_n64
╠                           -abi_mips_o32 -abi_ppc_32 -abi_ppc_64
╠                           -abi_s390_32 -abi_s390_64 -abi_x86_32
╠                           -abi_x86_64 -abi_x86_x32 -elibc_FreeBSD
╠                           -static-libs arm armv5te armv6
╠                           armv6t2 big-endian cpu_flags_arm_edsp
╠                           cpu_flags_arm_thumb cpu_flags_arm_thumb2
╠                           cpu_flags_arm_v4 cpu_flags_arm_v5
╠                           cpu_flags_arm_v6 cpu_flags_arm_v7
╠                           cpu_flags_arm_vfp elibc_glibc
╠                           extra-filters kernel_linux nls
╠                           threads userland_GNU
2019-07-12 22:20:49 +02:00
Ettore Di Giacinto
6628e0dd81 Merge pull request #72 from geaaru/equo-generate
Improve equo generate subcommand for CI
2019-03-14 20:25:43 +01:00
Daniele Rondina
cdaffff03b Improve equo generate subcommand for CI
Add option --force-non-interactive to generate
sub command to avoid use of expect tool.
2019-03-14 18:44:47 +01:00
Ettore Di Giacinto
35a3fa3c75 Merge pull request #68 from Enlik/modules-reorg
Make Entropy able to work from within Python site directory
2019-03-13 22:48:40 +01:00
Ettore Di Giacinto
cd640cebd3 Merge pull request #71 from geaaru/inject-reset-revision
eit: Add --reset-revision option to inject command
2019-03-06 21:07:47 +01:00
Daniele Rondina
215e5b019e eit: Add --reset-revision option to inject command 2019-03-01 19:02:56 +01:00
Sławomir Nizio
545b5a7ca4 [tests] fix import path
It couldn't find and load _entropy.solo.commands.pkg.
2018-11-26 21:09:08 +01:00