Commit Graph

11517 Commits

Author SHA1 Message Date
Ettore Di Giacinto
e16a1585ec Release Entropy 319 2018-11-22 21:59:03 +01:00
Ettore Di Giacinto
6eedde7237 Merge pull request #67 from Enlik/fasterxpak
[entropy.spm] speed up xpak finding
2018-11-16 18:30:32 +01:00
Ettore Di Giacinto
450456a4ec Merge pull request #65 from Enlik/modules-reorg
Preparation for installation in Python-specific directories
2018-11-16 18:29:44 +01:00
Sławomir Nizio
a0d8c18b49 [entropy.spm] speed up xpak finding
Now it's chunk based, so fewer reads and seeks, and searching itself
is improved as well.
2018-11-14 09:10:34 +01:00
Fabio Erculiani
1c083477dc Merge pull request #66 from geaaru/eit-push-py36
Fix vacuum on py3.6
2018-11-05 10:07:02 +01:00
Geaaru
4b728b998e Fix vacuum on py3.6
pysqlite has a bug on use VACUUM with py3.6 (see https://github.com/ghaering/pysqlite/issues/109)

Hereinafter, exception related to eit push --quick --force <REPO> command:

Traceback (most recent call last):
  File "/usr/lib/entropy/lib/entropy/db/sql.py", line 166, in _proxy_call
    return method(*args, **kwargs)
sqlite3.OperationalError: cannot VACUUM from within a transaction

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/eit", line 17, in <module>
    main()
  File "/usr/lib/entropy/server/eit/main.py", line 114, in main
    exit_st = func(*func_args)
  File "/usr/lib/entropy/server/eit/commands/command.py", line 237, in _call_exclusive
    return func(server)
  File "/usr/lib/entropy/server/eit/commands/push.py", line 172, in _push
    rc = self._push_repo(entropy_server, repository_id)
  File "/usr/lib/entropy/server/eit/commands/push.py", line 184, in _push_repo
    rc = self.__push_repo(entropy_server, repository_id)
  File "/usr/lib/entropy/server/eit/commands/push.py", line 309, in __push_repo
    sts = self.__sync_repo(entropy_server, repository_id)
  File "/usr/lib/entropy/server/eit/commands/push.py", line 262, in __sync_repo
    enable_download = False, force = self._force)
  File "/usr/lib/entropy/lib/entropy/server/interfaces/mirrors.py", line 1673, in sync_repository
    enable_upload, enable_download, force = force)
  File "/usr/lib/entropy/lib/entropy/server/interfaces/db.py", line 231, in update
    enable_upload, enable_download, force = force).update()
  File "/usr/lib/entropy/lib/entropy/server/interfaces/db.py", line 404, in update
    rc, fine_uris, broken_uris = self._sync()
  File "/usr/lib/entropy/lib/entropy/server/interfaces/db.py", line 1873, in _sync
    broken_uris = self._upload(uris)
  File "/usr/lib/entropy/lib/entropy/server/interfaces/db.py", line 1529, in _upload
    self._shrink_and_close(dbconn)
  File "/usr/lib/entropy/lib/entropy/server/interfaces/db.py", line 1234, in _shrink_and_close
    entropy_repository.vacuum()
  File "/usr/lib/entropy/lib/entropy/db/sqlite.py", line 703, in vacuum
    self._cursor().execute("vacuum")
  File "/usr/lib/entropy/lib/entropy/db/sqlite.py", line 58, in execute
    cur = self._proxy_call(self._cur.execute, *args, **kwargs)
  File "/usr/lib/entropy/lib/entropy/db/sql.py", line 173, in _proxy_call
    raise OperationalError(err)
entropy.db.exceptions.OperationalError: cannot VACUUM from within a transaction
2018-11-04 21:50:50 +01:00
Fabio Erculiani
2c1e3855b9 Tagging Entropy version 318 318 2018-11-03 20:18:26 +01:00
Fabio Erculiani
c0b065fbff Release Entropy 318 2018-11-03 20:18:26 +01:00
Fabio Erculiani
5097f7d7a4 Rigo: fix LTS and non-LTS kernel menu.
Since Gentoo EAPI=7, old-style virtual packages have been removed.
We will use KernelSwitcher to get a list of kernel packages to show.
2018-11-03 20:15:44 +01:00
Fabio Erculiani
abb7800e86 kswitch: allow to pass the preferred kernel virtual.
It's possible to choose between LTS and non-LTS kernels via list() now.
2018-11-03 20:14:34 +01:00
Sławomir Nizio
f4332c76c8 [magneto] import entropy modules at upper level
Otherwise "entropy" module loading logic was delayed, excluding this
import (which was done early, before entropy_path_loader logic):

    from entropy.locks import SimpleFileLock

and it failed when system wide PYTHONPATH is dropped.

There was a comment not to do an early import due to --no-pid-handling.
The comment was added in:

    commit 59e5fd737e
    Date:   Tue Mar 1 13:13:18 2011 +0100

	[magneto] fix lock file handling

but then the logic was reworked in:

    commit 5d315c70bd
    Date:   Sun Feb 24 23:34:49 2013 +0100

	[entropy.const] drop /var/run/entropy/entropy.lock file and directory handling

and then passing --no-pid-handling (which was unused at this point) from
mangeto file was removed in:

    commit 83b8991c95
    Date:   Wed Feb 27 20:59:14 2013 +0000

	[magneto] rewrite systray icons management, improve KDE, GNOME and MATE integration
2018-11-03 19:13:19 +01:00
Sławomir Nizio
110b590fc5 [magneto] import also magneto (fix) 2018-11-03 17:48:38 +01:00
Sławomir Nizio
4297d17530 [misc, services] remove useless setting of PYTHONPATH 2018-10-28 21:56:41 +01:00
Sławomir Nizio
65b634adb2 [entropy.const] comment on the 'installdir' key 2018-10-28 21:54:28 +01:00
Sławomir Nizio
33966f4f31 [*] allow setting PYTHON_SITEDIR for make
This way a proper separation between Python installs can be achieved.

With no PYTHON_SITEDIR, installation paths are exactly the same as
before this change.

In practise, passing nonstandard path will break Entropy but so it is
also with the currently available LIBDIR. This is a concern of a future
improvement (at least the PYTHON_SITEDIR path, not necessarily LIBDIR as
PYTHON_SITEDIR *will* be different if it's installed in Python specific
directories).
2018-10-28 21:44:54 +01:00
Sławomir Nizio
0ccbc1f093 [Rigo] update ("reformat" only) translations
Due to a change of a .py file.
2018-10-28 19:53:53 +01:00
Sławomir Nizio
96909f6d29 [rigo/po] add RigoDaemon_app.py to POTFILES.in 2018-10-28 19:50:46 +01:00
Sławomir Nizio
b44be655b2 [magneto] remove wrapper, install the main Python file to PATH directly
The wrapper was making it more difficult to use the correct system wide
Python implementation.
2018-10-28 19:28:21 +01:00
Sławomir Nizio
90ecb5b00d [RigoDaemon] make the application part be in /usr/libexec
This way there is no hardcoded /usr/lib/rigo, and the "executable" part
is in a well known location which can be replicated on system for
different Python implementations. (As in: it will be like /usr/bin/foo.py
which on Gentoo links to a system wrapper making it use configured
Python.)
2018-10-28 19:16:54 +01:00
Ettore Di Giacinto
d44d473b19 Merge pull request #63 from Enlik/modules-reorg
[*] be strict about Python modules paths being loaded
2018-10-28 14:21:27 +01:00
Sławomir Nizio
41ba9b6d63 [*] be strict about Python modules paths being loaded
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.
2018-10-27 13:03:58 +02:00
Fabio Erculiani
c411a93dc5 [entropy.tools] correctly parse scanelf output even when spaces are present everywhere.
This is a ";" separated data input (even though we may get directory
paths containing ";"... but none so far is expected to be legit.)

Split by ";" first and then deal with spaces in paths.
2018-09-29 22:49:34 +02:00
Fabio Erculiani
066ec3ac35 [client/po] Fix broken chars in German translation. See bug #5175. 2018-09-29 22:04:54 +02:00
Fabio Erculiani
8c786b7a05 [client/po] fix Italian translation for "item", see bug #5312. 2018-09-29 21:59:16 +02:00
Fabio Erculiani
0bcf6a5885 Tagging Entropy version 317 317 2018-09-23 22:29:48 +02:00
Fabio Erculiani
a7171bdc7e Release Entropy 317 2018-09-23 22:29:48 +02:00
Fabio Erculiani
6b097b57cb [entropy.db.sql] fix comparison between different types with Py3. 2018-09-23 22:25:00 +02:00
Fabio Erculiani
e9b211eea0 [entropy.spm] improve handling of non-ascii paths (e.g. puppet-agent).
It looks like Portage now stores unicode paths correctly in its metadata
as opposed to what it used to be. We need to make sure that we parse those
"CONTENTS" file and content metadata in general using the correct encoding.
This will allow us to store and retrieve such metadata from the sqlite3
database correctly and also match the stored paths with the filesystem
paths exactly.

This commit may need a bit more real-life testing. Backward compat
wrt old Entropy and Portage tbz2 files should be as expected.
Unit tests attached.
2018-09-23 22:06:05 +02:00
Fabio Erculiani
34c549feb8 [entropy.client] handle correctly encoded file paths too.
Historically, Portage + Py2 were not dealing well with file paths that
were containing non-ascii chars. The situation has apparently improved
and we are able to accept paths with the correct encoding in Entropy
(separate patch will come). We need to guard against broken paths anyway,
so let's try to check which one of the paths is the one that has the
most chance to be the right one. Also, with python3 this won't be
a problem anymore...
2018-09-23 21:01:26 +02:00
Fabio Erculiani
c753f215d6 [entropy.db.sql] use etpConst instead of hardcoded encoding strings. 2018-09-23 20:56:04 +02:00
Fabio Erculiani
eb45950648 Tagging Entropy version 316 316 2018-09-23 15:41:49 +02:00
Fabio Erculiani
f0e6b09ee2 Release Entropy 316 2018-09-23 15:41:48 +02:00
Fabio Erculiani
afda55090e [rigo/po] update translations for Rigo. 2018-09-23 15:41:21 +02:00
Fabio Erculiani
5182a5cfea [rigo/pot] update rigo.pot 2018-09-23 15:40:45 +02:00
Fabio Erculiani
fe44bb34b2 [client/po] update .po files 2018-09-23 15:39:43 +02:00
Fabio Erculiani
adb456d498 Update entropy.pot 2018-09-23 15:39:09 +02:00
Fabio Erculiani
4040523908 [kswitch] correctly resolve external kernel modules when not using --from-running.
Due to the migration to real virtual packages (away from PROVIDE= due
to EAPI=7 constraints), we failed to resolve kernel binary packages
correctly, thus packages that require them (external kernel modules.)

This patch fixes it, by making sure that we resolve new virtuals correctly.
We expect new virtuals to list kernel packages in their RDEPEND= (runtime
dependecies.)
2018-09-23 15:37:21 +02:00
Fabio Erculiani
30ea708c4e Tagging Entropy version 315 315 2018-09-22 19:39:42 +02:00
Fabio Erculiani
a5890973b1 Release Entropy 315 2018-09-22 19:39:42 +02:00
Fabio Erculiani
2d61be2c4c [kswitch] fix kernel-switcher behavior when kernels are in external repos.
See the code documentation for more info.
2018-09-22 19:34:17 +02:00
Fabio Erculiani
9a28a9d025 [kswitch] write a more reliable list comprehension. 2018-09-22 18:23:37 +02:00
Fabio Erculiani
e319701afe [kswitch] do not rely on startswith but rather exact category matching. 2018-09-22 18:21:39 +02:00
Ettore Di Giacinto
43556ce06f Tagging Entropy version 314 314 2018-09-08 23:17:00 +02:00
Ettore Di Giacinto
d420cf5774 Release Entropy 314 2018-09-08 23:16:57 +02:00
Ettore Di Giacinto
b5cd3f6401 Merge pull request #61 from Enlik/kswitch-revdep
[kswitch] use reverse dep. not PROVIDE
2018-09-08 23:13:29 +02:00
Sławomir Nizio
1bccb28589 [ci] separate commands to file, make sure there is /usr/portage/profiles 2018-09-08 23:01:30 +02:00
Sławomir Nizio
f70b673f5e [kswitch] use reverse dep. not PROVIDE
The latter method does not work nowadays, after bumping Portage
(2.3.40-r1) or related to EAPI 7.
2018-09-08 18:32:20 +02:00
Fabio Erculiani
e84620515f Tagging Entropy version 313 313 2018-08-18 09:25:08 +02:00
Fabio Erculiani
12aafd8e5e Release Entropy 313 2018-08-18 09:25:08 +02:00
Fabio Erculiani
7e8047ccdf Merge pull request #59 from Enlik/eapi7-bdepend
[entropy.spm] add support for BDEPEND (from EAPI 7)
2018-08-18 09:24:23 +02:00