Commit Graph

732 Commits

Author SHA1 Message Date
Fabio Erculiani 92c870e570 [entropy.server] RepositoryConfigParser: make possible to leave the base= parameter unset 2013-03-30 12:48:35 +00:00
Fabio Erculiani b35bf09994 [entropy.server.interfaces] export RepositoryConfigParser 2013-03-30 12:48:13 +00:00
Fabio Erculiani 510605a687 [entropy.server] RepositoryConfigParser: add repository add, remove methods 2013-03-30 08:42:48 +00:00
Fabio Erculiani dd4fc47774 [entropy.core.settings.base] add support for disabled repository ini files
Together with the "enabled=" repository configuration option inside repository
configuration files, the same ones can be in a disabled state if they are prefixed
with "_<file prefix>" (where <file prefix> is entropy_ at this time).
2013-03-30 08:30:35 +00:00
Fabio Erculiani 2ec410de69 [entropy.client] RepositoryConfigParser: add enable, disable, add, remove methods 2013-03-30 00:21:58 +00:00
Fabio Erculiani e80f4fc40a [entropy.client] move the repository config file prefix string to RepositoryConfigParser 2013-03-29 23:18:54 +00:00
Fabio Erculiani a2b73f7741 [entropy.server] RepositoryConfigParser: add write() method 2013-03-29 22:51:46 +00:00
Fabio Erculiani 9493163db1 Release Entropy 188 2013-03-29 12:12:51 +00:00
Fabio Erculiani 22fdc5026c [entropy.const] const_mkdtemp: call makedirs() only if dir=etpConst['entropyunpackdir'] 2013-03-29 12:10:24 +00: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 0a6a70ce08 [entropy.core.settings.base] add missing _() import 2013-03-29 11:42:26 +00:00
Fabio Erculiani 4c58fc9fbe [entropy*] create const_mkdtemp() as tempfile.mkdtemp() 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 11:41:05 +00:00
Fabio Erculiani bc083adbe9 [entropy.spm] PortagePlugin: use /var/tmp/entropy as mkdtemp() dir in doebuild()
This avoids problems for users using tmpfs /tmp
2013-03-29 08:10:44 +00:00
Fabio Erculiani c2d7ed7d72 Release Entropy 187 2013-03-25 08:56:19 +00:00
Fabio Erculiani 2dc1438373 [tests] security: create temporary directory using TMPDIR or, if unset, $PWD 2013-03-23 19:00:15 +00:00
Fabio Erculiani 565db8d1a5 [entropy.client] add support for multiple "repo =" repository parameters
This improves the availability when one or more repository database
mirrors are down.
2013-03-23 18:48:02 +00:00
Fabio Erculiani b395b13d84 [tests] db: fix test_libs_download 2013-03-23 11:42:42 +00:00
Fabio Erculiani 1cd7838385 [entropy.db.sql] definitely fix the cursor object wrapping 2013-03-23 11:38:39 +00:00
Fabio Erculiani da8a2a1d22 [entropy.db] use super() instead of class.__init__() 2013-03-23 11:31:50 +00:00
Fabio Erculiani b7ebbf8f47 [entropy.client.dep] __get_library_breakages: handle the new library dependencies case
It happened that __get_library_breakages only handled library bumps and
not also another important case: new library dependencies. This check is
very important at runtime, because it helps coping with unsatisfied
library dependencies (that might be satisfied at the package dependencies
level).
For instance, upgrading udev may fail because the new udevadm depends
against libblkid.so.1, which is a new dependency, while the util-linux
dependency metadatum is not enforcing the new version well enough.
2013-03-22 13:56:41 +00:00
Fabio Erculiani 3e30d2414d Release Entropy 186 2013-03-20 16:50:21 +00:00
Fabio Erculiani 831237b7fc [entropy.server] insert the package SHA1 checksum into the file name
This commit partially reverts commit d6b7a21314.
Package revision is no longer incremented across package moves.
This has two advantages:
  - much less traffic generated on the mirror infrastructure
  - less updates for sabayon-limbo users when packages are moved to main

Bumping the revision was required by sabayon-weekly, which had the problem
that some package files were replaced during normal activity on
sabayonlinux.org and sabayon-limbo on the mirror. This generated checksum
errors, thus adding the checksum in the package file name ensures that
Entropy Server will never overwrite package file names unless the checksum
also matches.
Having a SHA1 checksum in the file name is also good for security, and
we may even want to create a SHA1 from the GPG signature in future.
2013-03-20 15:21:31 +00:00
Fabio Erculiani f0fad25ca5 Release Entropy 185 2013-03-19 15:27:33 +00:00
Fabio Erculiani e601bc1144 [entropy.client.dep] fix or dependencies selection when none is installed 2013-03-19 15:27:00 +00:00
Fabio Erculiani af55cef3be [entropy.db.sql] wrap the whole tuple() and frozenset() generation 2013-03-19 15:02:23 +00:00
Fabio Erculiani bc9e6e2146 [entropy.db.sql] wrap _cur2tuple and _cur2frozenset functions using SQLCursorWrapper 2013-03-19 14:57:03 +00:00
Fabio Erculiani f0f3883a86 Release Entropy 184 2013-03-17 08:27:56 +00:00
Fabio Erculiani bf766fe571 Release Entropy 183 2013-03-13 12:25:46 +00:00
Fabio Erculiani c360738b95 [kswitch] fix install path, resolve bug 4073 2013-03-13 12:03:39 +00:00
Fabio Erculiani b36a8669d4 [conf] drop the "remote web services server url" part from repository "repo =" param
This has been deprecated for long time.
2013-03-12 21:10:17 +00:00
Fabio Erculiani d3fab6937c Release Entropy 182 2013-03-12 14:13:56 +00:00
Fabio Erculiani f02283523d [entropy.db,entropy.spm] rewrite SPM package metadata update code
This commit moves all the SPM package metadata update logic, including
pkgmove and slotmove to entropy.spm plugins.
This makes possible to handle the event more reliably. In particular,
Entropy now controls what Portage does, basing on the repository treeupdates
information.
The scenario in where the Portage tree was not updated and the called
"emaint --fix moveinst" did not do what it was supposed to do is now
handled correctly.
2013-03-12 13:55:01 +00:00
Fabio Erculiani 6804e79b37 [entropy.client.interfaces.repository] drop is_root(), this is always running as root 2013-03-12 13:53:12 +00:00
Fabio Erculiani 9b81edfd18 [entropy.core] RepositoryConfigParser: always catch KeyError when raised 2013-03-10 22:38:14 +00:00
Fabio Erculiani ddf1f9ce3c [entropy.core] RepositoryConfigParser: respect repository definition order 2013-03-10 22:37:49 +00:00
Fabio Erculiani bc63d82b97 [entropy.server] add support for server-side repositories.conf.d/ repository config files
Entropy Server now supports repositories defined inside
    /etc/entropy/repositories.conf.d/ files, written using the
    syntax detailed below. This improves the ability to enable, disable,
    add and remove repositories programmatically. Furthermore, it
    makes possible to extend the supported parameters without breaking
    backward compatibility.

    In order to differentiate Entropy Client repository definitions between
    Entropy Server ones, each repository section must start with "[server=".

    This is an example of the syntax (with a complete listing
    of the supported arguments):

    [server=sabayon-limbo]
    desc = Sabayon Linux Official Testing Repository
    repo = ssh://username@full.host:~username/sabayon-limbo
    enabled = <true/false>

    [server=sabayon-limbo]
    desc = This statement will be ignored.
    repo-only = ssh://username@repo.host:~username/sabayon-limbo
    pkg-only = ssh://username@pkg.host:~username/sabayon-limbo

    [server=sabayon-base]
    desc = This is the base repository.
    repo-only = ssh://username@repo.host:~username/sabayon-base
    pkg-only = ssh://username@pkg.host:~username/sabayon-base
    base = <true/false>

    As you can see, multiple statements for the same repository
    are allowed. However, only the first desc = statement will be
    considered, while there can be as many {pkg,repo}* = as you want.

    The repository order is important, but this is guaranteed by the
    fact that configuration files are parsed in lexical order.

    Statements description:
    - "desc": stands for description, the repository name description.
    - "repo": the push & pull URI, for both packages and repository database.
    - "repo-only": same as repo, but only for the repository database
                   push & pull.
    - "pkg-only": same as repo, but only for the packages push & pull.
             The supported protocols are those supported by entropy.fetchers.
    - "enabled": if set, its value can be either "true" or "false". The default
                 value is "true". It indicates if a repository is configured
                 but currently disabled or enabled. Please take into account
                 that config files in /etc/entropy/repositories.conf.d/ starting
                 with "_" are considered to contain disabled repositories. This
                 is just provided for convienence.
    - "base": if set, its value can be either "true" or "false". The default
              value is "false". If no repository has the flag set, the first
              listed repository will be the base one. Only the first repository
              with "base = true" will be considered. The base repository is the
              repository that is considered base for all the others
              (the main one).
2013-03-10 22:12:27 +00:00
Fabio Erculiani 81baa1d58e [entropy.core] BaseConfigParser: store section parse order (and properly rename variables) 2013-03-10 18:25:56 +00:00
Fabio Erculiani 6e96b38a7e [entropy.core] properly pass encoding= to RepositoryConfigParser 2013-03-10 00:08:47 +00:00
Fabio Erculiani 05f446d51a [entropy.client] add .ini like repositories.conf.d/ files support
This is backward compatible with the previous repository
    implementation, in the sense that old repository syntax
    is just ignored. However, a mix of old and new statements
    may result in an undefined behaviour.

    This is an example of the new syntax (with a complete listing
    of the supported arguments):

    [sabayon-limbo]
    desc = Sabayon Linux Official Testing Repository
    repo = http://pkg.sabayon.org,sabayon.org
    pkg = http://pkg.sabayon.org
    pkg = http://dl.sabayon.org/entropy
    enabled = <true/false>

    [sabayon-limbo]
    desc = This statement will be ignored.
    repo = This url will be ignored.
    pkg = http://some.more.mirror.org/entropy
    pkg = http://some.more.mirror.net/entropy

    As you can see, multiple statements for the same repository
    are allowed. However, only the first desc = and repo =
    statements will be considered, while there can be as many pkg =
    as you want.

    Statements description:
    - "desc": stands for description, the repository name description.
    - "repo": the repository database URL string, plus other parameters
              as supported in the previous configuration file syntax:
              <db url prefix>[,<remote web services server url][#<compression>].
    - "pkg": the repository packages URL string. This must be a valid URL.
             The supported protocols are those supported by entropy.fetchers.
    - "enabled": if set, its value can be either "true" or "false". The default
                 value is "true". It indicates if a repository is configured
                 but currently disabled or enabled. Please take into account
                 that config files in /etc/entropy/repositories.conf.d/ starting
                 with "_" are considered to contain disabled repositories. This
                 is just provided for convienence.
2013-03-09 23:51:58 +00:00
Fabio Erculiani 1b18a831f1 Release Entropy 181 2013-03-08 13:42:32 +01:00
Fabio Erculiani b44c89ad19 [kernel-switcher] turn the kernel switcher library into an OO interface 2013-03-06 15:51:35 +00:00
Fabio Erculiani d05426e618 [kernel-switcher] move kswitch to entropy lib, kernel-switcher back to equo 2013-03-06 15:28:56 +00:00
Fabio Erculiani 502d9c8b9e [entropy.client.package] add support for package.splitdebug.mask, see bug 3707 2013-03-05 15:52:53 +00:00
Fabio Erculiani 5cb3939718 [entropy.client] drop package.satisfied support, see bug #3879
It never worked as users expected and can lead to misinterpretation.
It will be reimplemented in future through something similar to package.provided
2013-03-05 15:09:44 +00:00
Fabio Erculiani 84b0b92c4e [entropy.client.dep] rewrite simple or dependencies resolution
Selected matches was not respected by the simple or dependencies
resolution code. This commit addresses the problem and fixes the
virtual/glu dependendency handling.
2013-03-05 13:20:28 +00:00
Fabio Erculiani 7573e0e1d5 Release Entropy 180 2013-03-03 01:08:10 +00:00
Fabio Erculiani b905b98525 [entropy.server] _calculate_sync_queues: ignore remote package file if a local .weak file exists 2013-03-03 01:06:31 +00:00
Fabio Erculiani 873ae5267b [entropy.server] _calculate_sync_queues: ignore local package file if .weak file exists 2013-03-03 01:03:52 +00:00
Fabio Erculiani 46577fe93f [entropy.server] _calculate_local_package_files: properly handle .weak files 2013-03-03 00:54:01 +00:00
Fabio Erculiani 3a49a8cc47 [entropy.server] _calculate_local_package_files: take into consideration .weak files 2013-03-03 00:39:54 +00:00