148 Commits

Author SHA1 Message Date
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
Sławomir Nizio e96db09ad7 [solo.commands,lib] display packages that pull in conflicting ones 2016-08-05 20:00:21 +02:00
Fabio Erculiani 265eb182f8 [Rigo] fix various deprecation warnings 2015-01-04 16:13:12 +00:00
Fabio Erculiani 03ef3991bd [entropy.client] refactor NoticeBoard Entropy Client API 2014-02-14 13:10:16 +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 0c09a2f7ca [RigoDaemon] wrap TextInterface.output in order to catch all the messages 2013-12-31 15:16:56 +01:00
Fabio Erculiani f5efd44cc2 [RigoDaemon] acquire UpdatesNotificationResourceLock in non blocking mode
We cannot sleep with the activity mutex held without affecting
parallelism so badly. Otoh, we cannot wleep on UpdatesNotificationResourceLock
without affecting 3rd party clients in a way that we would starve them
for a while. So, try to acquire the file lock in non blocking mode
and if it fails, reschedule a new call as soon as the same lock is
freed (exclusive acquire succeeds). This assumes that if the lock
is held back, we will just re-do the whole trick again and again.
2013-12-26 22:52:12 +01:00
Fabio Erculiani f1a925c220 [solo.commands.install] acquire the notification lock in shared NB mode
This should avoid starvation in the scenario outlined in code comments.
2013-12-26 22:52:12 +01:00
Fabio Erculiani ec198d632b [RigoDaemon] make sure that the serializer is always released
Even in case of exceptions.
2013-12-26 22:52:12 +01:00
Fabio Erculiani bccbce4a34 [RigoDaemon] use UpdatesNotificationResourceLock to avoid signal spam
If this resource lock is acquired, block until the lock is released
so that we will not keep sending status updates to the connected clients
2013-12-26 22:52:12 +01:00
Fabio Erculiani 934a7ce14b [RigoDaemon] drop sleep()
With the new locking strategy, this is no longer necessary
2013-12-26 22:52:12 +01:00
Fabio Erculiani c22f4121f6 [RigoDaemon] use ClientSettings() rather than SystemSettings()[id] 2013-12-12 19:22:42 +01:00
Fabio Erculiani ebf63e6060 [entropy.locks] fix shared/exclusive locking mix due to reentrancy, add tests 2013-12-08 16:15:39 +01:00
Fabio Erculiani 358c6cc80c [entropy.client.repository] drop unlocked_sync(), locking happens externally nowadays 2013-12-08 14:42:23 +01:00
Fabio Erculiani 1917771b54 [entropy.locks] move Entropy Resources Lock code to a separate module 2013-12-08 14:37:57 +01:00
Fabio Erculiani c0776b07bd [RigoDaemon] import the threading module directly 2013-12-08 06:17:15 +01:00
Fabio Erculiani 0f32ae2696 [RigoDaemon] use systemd-logind shutdown/idle Inhibit() API
Inhibit shutdown or idling (see systemd documentation) during
application management or repository update phases.
2013-12-08 06:13:38 +01:00
Fabio Erculiani d8ee468768 [RigoDaemon] add execute_mainloop() wrapper method 2013-12-08 06:13:11 +01:00
Fabio Erculiani e213a5e775 [RigoDaemon] fix regression in api(), the keyword argument must be "sender" 2013-12-07 20:30:07 +01:00
Fabio Erculiani 4e597b8769 [RigoDaemon] use a shared lock with clean_package_cache 2013-12-07 20:30:07 +01:00
Fabio Erculiani 529203ce5a [RigoDaemon] maybe_enqueue_kernel_actions: use simulate 2013-12-07 20:30:06 +01:00
Fabio Erculiani 4f9d8ef61d [RigoDaemon] fixup pylint warnings 2013-12-07 20:30:06 +01:00
Fabio Erculiani 94e07648ec [RigoDaemon] add concurrency support \o/ 2013-12-07 20:30:06 +01:00
Fabio Erculiani d88e33c40c [RigoDaemon] use context manager with ReadersWritersSemaphore 2013-12-07 20:30:06 +01:00
Fabio Erculiani 82b85704ce [entropy.output] make TextInterface methods classmethods
This makes possible to fix a circular dependency in the Entropy
Resources Lock management methods
2013-12-05 21:36:30 +01:00
Fabio Erculiani 7fc8ad14ad [RigoDaemon] add debug output on _authorize callback method 2013-11-29 11:57:57 +01:00
Fabio Erculiani 04048b8818 [RigoDaemon] signal preserved libraries through preserved_libraries_available() 2013-11-29 10:48:50 +01:00
Fabio Erculiani 41e0cf576b [RigoDaemon] migrate to the new PackageActionFactory API 2013-11-23 14:14:48 +01:00
Fabio Erculiani 8c5a499e58 [RigoDaemon] set the default terminal (${TERM}) if unset
This prevents portage phases printing weird things about missing ${TERM}
2013-11-21 21:48:07 +01:00
Fabio Erculiani 3431755aaf [RigoDaemon] do not trigger kernel-switcher if kernel is already installed 2013-11-13 15:36:32 +01:00
Fabio Erculiani 42ab0c38a1 [RigoDaemon] use KernelSwitcher.list() rather than reimplementing the same logic 2013-11-13 13:17:14 +01:00
Fabio Erculiani e93eb24728 [RigoDaemon] implement transparent kernel-switcher support 2013-11-13 13:14:17 +01:00
Fabio Erculiani a323563b22 [RigoDaemon] add "system_restart_needed" signaling 2013-11-05 11:17:32 +01:00
Fabio Erculiani b71ede2b25 [RigoDaemon] implement support for fetch_abort_function
This makes possible to immediately interrupt the download process
2013-11-03 15:39:43 +01:00
Fabio Erculiani a0f684b8ae [RigoDaemon] fix MultipleUrlFetcher stats computation
Also introduce stale data handling.
2013-11-03 14:41:21 +01:00
Fabio Erculiani b1642ac2cb [RigoDaemon] *UrlFetcher: move class variables inside instance 2013-11-03 14:11:22 +01:00
Fabio Erculiani 898a200479 [RigoDaemon] always avoid transfer_output() signal floods 2013-11-03 13:59:18 +01:00
Fabio Erculiani 60febda4f0 [RigoDaemon] add initial One Click Update notification support 2013-11-03 12:57:08 +01:00
Fabio Erculiani 5b9a5ee273 [RigoDaemon] extend updates_available() signal with "One Click Update" information 2013-11-02 14:17:33 +01:00
Fabio Erculiani e02c8da563 [RigoDaemon] fix xml indentation 2013-11-02 14:12:22 +01:00
Fabio Erculiani 79261d5086 [RigoDaemon] increase auto_repositories_update randomization space 2013-10-21 13:08:29 +02:00
Fabio Erculiani 27659c6dc6 [RigoDaemon] drop access() usage 2013-09-18 08:53:44 +02:00
Fabio Erculiani 7ff15f22eb [RigoDaemon] randomize _auto_repositories_update to avoid bursts of requests 2013-06-10 11:07:18 +02:00
Fabio Erculiani d6295b3e00 [entropy*] create const_mkstemp() as tempfile.mkstemp() wrapper.
using /tmp as TMPDIR is a no go, since on modern systems, /tmp is on
tmpfs with a very limited amount of fs size assigned. Use /var/tmp/entropy
(or /var/tmp as fallback) instead.
2013-03-29 12:09:17 +00:00
Fabio Erculiani 73abfc6fa0 [RigoDaemon] schedule a reload every 24 hours to cut on Python leaks. 2013-03-04 13:59:44 +00:00
Fabio Erculiani 7771d641e2 [entropy.client] extend Client.calculate_updates() to return critical updates info
calculate_updates() now returns a dictionary containing the same pieces of
information available before. In addition, it now also returns if critical
updates were found and returned by the method itself.
This is particularly useful for enforcing relaxed deps calculation in case
of critical updates (which is what happens now).

This commit breaks the Entropy Client API.
2013-02-24 13:30:28 +00:00
Fabio Erculiani 1655cb3baa [RigoDaemon] drop send_requested_reply from dbus config, causes deadlock with gdm-3.6 2013-02-12 14:22:56 +01:00