Commit Graph

526 Commits

Author SHA1 Message Date
Sławomir Nizio 8700aade27 [entropy.spm, rigo] Rigo related Python 3 fixes
1)
  File "/usr/lib/python-exec/python3.6/RigoDaemon_app.py", line 362, in _pusher
    fobj.write(chunk)
TypeError: write() argument must be str, not bytes

2)
  File "/usr/lib64/python3.6/site-packages/entropy/spm/plugins/interfaces/portage_plugin/__init__.py", line 77, in __init__
    self.buffer = Writer(self, self._std.buffer)
AttributeError: 'FakeOutFile' object has no attribute 'buffer'
2020-02-11 22:26:20 +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 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 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
Sławomir Nizio ed93a3737d update RigoDaemon imports 2018-11-26 20:15:36 +01:00
Sławomir Nizio 503e7077f3 update rigo imports 2018-11-26 20:15:36 +01:00
Sławomir Nizio 6d4a3f09e6 makefiles: establish a layout for sitedir installs
The idea is that:
- entropy.* imports will work as before (so any 3rd party clients will
  work as always) - installed in "entropy" package,
- new "_entropy" package to hold a namespace for private modules (like
  ones that required adding special directories to sys.path).
  (Underscored name for a top level Python module is not very common...
  anyway, it was inspired by "_emerge.")

Layout:
site-packages/
    entropy (backwards compatible)
	const.py
	...
    kswitch (also toplevel to keep compatibility)
	...
    _entropy
	eit
	magneto
	matter
	rigo
	RigoDaemon
	solo

(Note that site-packages does not need to be actually Python's
site-packages directory but anything as it is controlled by an argument
to make. It is however intended to be the sitedir.)

Another idea for a layout would be one that mimics sources checkout, but
the layout there is somewhat scattered. (And some ugliness would be
needed to make them modules before implicit namespaces from Python 3.3.
Anyway, imports would be long and ugly.)

Now, the layout of installed Entropy is lean; installation to virtualenv
is also possible (though there would be a need to call scripts like
"python equo.py" as shebangs are not converted).

Follow up changes are needed to make it work.
2018-11-26 20:15:36 +01:00
Sławomir Nizio 252c260f06 use entropy_path_loader only for running from the checkout
After this commit alone it would not work when installed (unless module
paths are set in a special way). Next changes will introduce
installation to site-packages so no custom PYTHONPATH will be necessary.
2018-11-26 20:15:36 +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
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
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 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
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 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
Ettore Di Giacinto dd36b7e8cd [rigo/po] Update translations 2018-06-03 09:25:39 +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 18fa7ebf5d [RigoDaemon] fix typo in debug string name 2017-10-08 21:14:51 +02:00
Fabio Erculiani 98cd2b2b9f [rigo] Force terminal expansion, fixes bug #5305 2016-11-19 21:14:41 +01:00
Sławomir Nizio e96db09ad7 [solo.commands,lib] display packages that pull in conflicting ones 2016-08-05 20:00:21 +02:00
Fabio Erculiani 91ed0f744d Update translations 2016-03-20 19:32:01 +01:00
Fabio Erculiani edcd57c9de [Rigo] Gtk 3.14 fixes 2015-01-13 10:18:46 +00:00
Fabio Erculiani 265eb182f8 [Rigo] fix various deprecation warnings 2015-01-04 16:13:12 +00:00
Fabio Erculiani 788e54ced3 [Rigo] update translations 2014-04-04 11:35:27 +02:00
Fabio Erculiani a04e6381bb [Rigo] update translations 2014-03-16 17:03:48 +01:00
Fabio Erculiani 7bc1306d28 [Rigo] require Gtk+ 3.10 and solve all deprecation warnings related to Gtk*Box 2014-03-02 12:13:14 +01:00
Fabio Erculiani e4411da049 [Rigo] update translations 2014-02-14 16:14:59 +01:00
Fabio Erculiani 03ef3991bd [entropy.client] refactor NoticeBoard Entropy Client API 2014-02-14 13:10:16 +01:00
Fabio Erculiani eb64e4156a [Rigo] do not show app management buttons during upgrade 2014-01-14 09:09:19 +01:00
Fabio Erculiani 0b1b213730 [Rigo] translate IDLE DaemonAppAction as well 2014-01-14 01:01:21 +01:00
Fabio Erculiani 14cff214c6 [Rigo] Always execute _entropy_bus() from the main thread, avoids deadlocks 2014-01-14 01:00:18 +01:00
Fabio Erculiani f9a80d7bd0 [Rigo] add IDLE to AppActions enum 2014-01-14 00:58:45 +01:00
Fabio Erculiani 7c8bfe8303 [Rigo] emit application-abort when busy() fails with BusyError 2014-01-14 00:14:09 +01:00
Fabio Erculiani 6b7e4f96c3 [Rigo] add UPGRADE to AppActions to match DaemonAppActions 2014-01-14 00:13:41 +01:00
Dušan a03296d92d Slovak translation update
finally translated to 100%
2014-01-05 11:27:54 +01:00
Dušan 1152e6e6f0 Slovak translation update 2014-01-05 10:11:47 +01:00
Dušan 95a37ca2a2 Slovak translation update
Fixed strings with plurals
2014-01-04 22:27:40 +01:00
Fabio Erculiani de156b083b [Rigo] change the EntropyRepository default cache policy to NONE
This saves a huge quantity of RAM, as happened with RigoDaemon
2014-01-04 11:16:00 +01:00
Fabio Erculiani 289add075b [Rigo] Update the Slovak translation, thanks to Dušan Kazik 2014-01-03 20:24:27 +01:00
Fabio Erculiani c65d713c91 [Rigo] fix NotificationBox message_type keyword argument 2014-01-03 15:12:12 +01:00
Fabio Erculiani cbe42edee9 [RigoDaemon] set the cache policy to EntropyRepositoryCachePolicies.NONE
This greatly reduces the memory consumption of RigoDaemon
2014-01-03 07:36:44 +01:00
Fabio Erculiani f446b8d05b [RigoDaemon] reimplement Entropy.get_repository()
We need to monkey patch isMainThread in order to return True for
the ActionQueueWorkerThread as well. This avoids EntropySQLRepository
to initialize an infinite number of cleanup monitor threads for a
thread that will never go away (the ActionQueueWorkerThread one).
2013-12-31 17:53:22 +01:00
Fabio Erculiani 5ccde22103 [RigoDaemon] clear resources at the end of the action queue 2013-12-31 16:54:34 +01:00
Fabio Erculiani 711db81d41 [Rigo] disable recent searches for now, since the feature doesn't respect the use cases 2013-12-31 16:02:09 +01:00
Fabio Erculiani be063dca57 [Rigo] emit application-abort when Application action is cancelled by the user 2013-12-31 15:59:13 +01:00
Fabio Erculiani 0c09a2f7ca [RigoDaemon] wrap TextInterface.output in order to catch all the messages 2013-12-31 15:16:56 +01:00