Commit Graph

519 Commits

Author SHA1 Message Date
Fabio Erculiani a27d922cb4 Release Entropy 145 2012-09-30 21:53:40 +02:00
Fabio Erculiani 398379294f [entropy.{spm,client}] fix content generation for injected packages
Since Entropy Client migration to file iterator-based content metadata,
such information became unavailable to Entropy SPM's add_installed_package().
In the Portage SPM plugin implementation, such method was responsible of
reconstructing the XPAK CONTENTS file if missing. Injected packages are actually
missing that file (because it does not get created through "emerge -B").
The net result is that Portage vdb metadata for Entropy injected packages was
incomplete.
2012-09-30 21:33:09 +02:00
Fabio Erculiani 34f3e248d2 Release Entropy 144 2012-09-21 16:45:54 +02:00
Fabio Erculiani 523d9783a6 [entropy.client.dep] force critical updates to be always pulled in. Avoids the Glibc effect 2012-09-21 15:31:09 +02:00
Fabio Erculiani 21e2251008 [entropy.server.mirrors] tidy_mirrors: make sure to clean the upload/ directory as well 2012-09-21 14:57:48 +02:00
Fabio Erculiani 505f664055 [entropy.client.db] fix typo in message string 2012-09-20 13:01:20 +02:00
Fabio Erculiani 050e700dcf [entropy.client.db] fallback to package URLs if the repository database URL is broken.
This commit introduces the ability for Entropy Client to fall back to
package URLs if the repository database URL is not responding as expected
(tested at the application level).
This improves fault-tolerance greatly.
2012-09-20 12:55:34 +02:00
Fabio Erculiani 4b0e7ee7d3 [entropy.tools] introduce expand_plain_database_mirror()
This follows the previously introduced expand_plain_package_mirror()
method. Now both methods can expand repository and package mirror URLs
read from Entropy repository configuration files adding product, arch
and branch information.
2012-09-20 12:53:49 +02:00
Fabio Erculiani 7cff01bbd5 [entropy.const] export "database" sub-directory constant through etpConst 2012-09-20 12:52:36 +02:00
Fabio Erculiani fa006188f1 Release Entropy 143 2012-09-17 12:41:56 +02:00
Fabio Erculiani 58f1682c41 [entropy.misc] drop EntropyGeoIP, no longer used 2012-09-15 12:50:53 +02:00
Fabio Erculiani 724a4d7e87 Release Entropy 142 2012-09-09 18:07:21 +02:00
Fabio Erculiani 3ee803c2ba [entropy.const] implement a debug watchdog thread dumper thread.
If ETP_DEBUG_WATCHDOG env variable is set, entropy.const will create
a timer thread that prints to stderr the full application thread dump.
This is quite useful in case of hard to reproduce deadlocks at the library
level.
2012-09-09 18:04:52 +02:00
Fabio Erculiani b25e2b8f03 [entropy.cache] replace fork() usage with multithreading.
Mixing multiprocessing with multithreading is bad and we all know that.
However, in this specific case there was nothing wrong in running tiny
functions in another process.
It seems that entropy.dump.dumpobj() is efficient enough nowadays to
have it running in the same process anyway.
2012-09-09 17:34:22 +02:00
Fabio Erculiani 446432c64d [entropy.const] do not alter etpConst['systemroot'] variable 2012-09-08 16:57:08 +02:00
Fabio Erculiani c39bec886b [tests] fix Entropy Client tests (add affected_infofiles metadata) 2012-09-08 16:56:44 +02:00
Fabio Erculiani 627af78498 [entropy.const] move Entropy Resources Lock path to /var/lib/entropy
This commit moves the Entropy Resources Lock from:
> /var/lib/entropy/client/database/<arch>/.using_resources
to a simpler:
> /var/lib/entropy/.using_resources

The main reason for the move is to make such path more consistent across
architectures.
2012-09-08 16:34:05 +02:00
Fabio Erculiani ab9e3e9791 [entropy.const] remove hardcoded slashes, rewrite paths using os.path.join() 2012-09-08 16:28:31 +02:00
Fabio Erculiani 5c1f8d9b94 Release Entropy 141 2012-09-06 20:04:42 +02:00
Fabio Erculiani 4bbf8d773b [entropy.client.trigger] implement support for automagic /usr/share/info/*/dir update 2012-09-06 20:01:17 +02:00
Fabio Erculiani 91a96abd45 Release Entropy 140 2012-09-03 19:25:01 +02:00
Fabio Erculiani 4a37aed84a Release Entropy 139 2012-09-02 17:21:40 +02:00
Fabio Erculiani 3d923e0727 Release Entropy 138 2012-09-01 15:24:16 +02:00
Fabio Erculiani 7ddb21276c [entropy.dump] do not use os.fdopen() in dumpobj()
It has been observed that using os.fdopen() below in multi-threaded
scenarios is causing EBADF (thus OSError). There is probably a racen
condition down in the stack or mkstemp() itself is not guaranteed against
concurrent access. For now, just consume one more file descriptor and
avoid the race completely.
2012-09-01 15:21:39 +02:00
Fabio Erculiani 32104fe63c [entropy.spm] __source_env_get_var: fix typo in tmp file prefix string 2012-08-27 11:47:00 +02:00
Fabio Erculiani 84b13ffb95 Release Entropy 137 2012-08-27 11:37:50 +02:00
Fabio Erculiani 0b9acb24a4 [entropy.spm] __source_env_get_var: avoid deadlocking due to stdout buffer full
Using subprocess.PIPE and Popen.wait() causes the child process to
block in case of write (stdout) buffer full. Rewrite the whole
function to use simple a simple fd via mkstemp(). This way, even
if the env variable is very long, the process won't hang.

This issue has been observed in dev-texlive/texlive-latexextra-2012's
SRC_URI, which is more than 131k chars long!
2012-08-27 11:32:42 +02:00
Fabio Erculiani 6744795912 Release Entropy 136 2012-08-24 16:16:15 +02:00
Fabio Erculiani 3be15f077b [entropy.server.db] when download is complete, unlock all the mirrors
Unlocking just the working one causes the others to be left in
locked status until a manual unlock is issued.
2012-08-23 11:29:27 +02:00
Fabio Erculiani d530ae4cb3 [entropy.spm] look for modinfo inside /usr/bin
After more than 10 years people still change paths like this.
:-/
2012-08-23 09:29:21 +02:00
Fabio Erculiani b2c88b0c20 Release Entropy 135 2012-08-22 17:43:41 +02:00
Fabio Erculiani 385c50b548 [entropy.services] fix string format arguments 2012-08-22 17:43:11 +02:00
Fabio Erculiani ab76d2254d [entropy.client.interfaces.db] fix undefined reference to TIMEOUT_FETCH_ERROR 2012-08-22 17:42:58 +02:00
Fabio Erculiani 541f518ec3 [entropy.misc] fix undefined reference to class object 2012-08-22 17:42:05 +02:00
Fabio Erculiani c64441dcfc [entropy.spm] PortagePlugin: explicitly save err object 2012-08-22 17:41:27 +02:00
Fabio Erculiani 4da0c49b07 [entropy.db.sql] move methods used by _addPackage() into class 2012-08-22 17:41:01 +02:00
Fabio Erculiani 04ce12e276 Release Entropy 134 2012-08-22 13:19:34 +02:00
Fabio Erculiani aae376f369 [entropy.client.package] filter out splitdebug paths if splitdebug is disabled
If splitdebug was previously enabled for a package, and its
files were installed, when splitdebug is turned off Package kept
printing collision messages about /usr/lib/debug files.
This happened because packages contain /usr/lib/debug paths in
their content metadata (even those with separate splitdebug tarballs)
and this wasn't cleared out before installed packages repository
metadata update. Thus, during the cleanup step, these paths popped out
generating invalid warnings.
2012-08-22 13:09:54 +02:00
Fabio Erculiani 657478b4ee [entropy.spm] ensure that Portage vdb cache is always invalidated
It happened that assign_uid_to_installed_package() did not explicitly
invalidate the Portage vdb cache and, while this is used inside
add_installed_package(), which did invalidate the vdb cache on its own
already, it is also called directly by entropy.client.interfaces.package
code.
Moreover, root= value wasn't properly handled throughout the execution
of add_installed_package(), which may have caused cache invalidation
issues described above.
2012-08-22 12:07:56 +02:00
Fabio Erculiani fc8ed7329d [entropy.*] don't use magic constants for UrlFetcher errors 2012-08-21 10:46:56 +02:00
Fabio Erculiani af7ed0d04c [entropy.fetchers] UrlFetcher: expose generic error codes via class property 2012-08-21 10:38:08 +02:00
Fabio Erculiani b68e9104b5 [entropy.fetchers] MultipleUrlFetcher: join() threads explicitly
This avoids a potentially infinite loop if one of the threads dies
unexpectedly.
2012-08-21 09:31:15 +02:00
Fabio Erculiani 796e71e9ac [repo] migrate shebangs to /usr/bin/python 2012-08-18 16:53:32 +02:00
Fabio Erculiani 1f84203788 [entropy.spm] PortagePlugin: Python 3.x, use f.buffer.write() with bytes() 2012-08-17 22:42:36 +02:00
Fabio Erculiani ff133b432a [entropy.services.client] restore Python 3.x compatibility 2012-08-17 22:30:45 +02:00
Fabio Erculiani 333e82ea10 [entropy.spm] PortagePlugin: keep keyslot as unicode, Python 3.x compatibility 2012-08-17 22:30:03 +02:00
Fabio Erculiani e90cb74c27 [entropy.spm] PortagePlugin: expose __next__() unconditionally 2012-08-17 21:41:08 +02:00
Fabio Erculiani 206fe49203 [entropy.db.sql] add __next__() to iterators, make Python3 happy 2012-08-17 21:40:55 +02:00
Fabio Erculiani 61eeaed14e [entropy.client.package] add __next__() to iterators, make Python3 happy 2012-08-17 21:40:35 +02:00
Fabio Erculiani a37d7ca195 [entropy.db.sqlite] move _addPackage() to entropy.db.sql 2012-08-16 21:35:45 +02:00