entropy.client.interfaces: rename all the mixin classes appending "Mixin"
This commit is contained in:
@@ -26,7 +26,7 @@ from entropy.exceptions import *
|
||||
from entropy.output import red, darkred, darkgreen
|
||||
from entropy.i18n import _
|
||||
|
||||
class Cache:
|
||||
class CacheMixin:
|
||||
|
||||
def validate_repositories_cache(self):
|
||||
# is the list of repos changed?
|
||||
|
||||
@@ -25,14 +25,16 @@ import os
|
||||
from entropy.core import Singleton
|
||||
from entropy.output import TextInterface
|
||||
from entropy.db import dbapi2
|
||||
from entropy.client.interfaces.loaders import Loaders
|
||||
from entropy.client.interfaces.cache import Cache
|
||||
from entropy.client.interfaces.dep import Calculators
|
||||
from entropy.client.interfaces.methods import Repository as CRepository, Misc, Match
|
||||
from entropy.client.interfaces.fetch import Fetchers
|
||||
from entropy.client.interfaces.metadata import Extractors
|
||||
from entropy.client.interfaces.loaders import LoadersMixin
|
||||
from entropy.client.interfaces.cache import CacheMixin
|
||||
from entropy.client.interfaces.dep import CalculatorsMixin
|
||||
from entropy.client.interfaces.methods import RepositoryMixin, MiscMixin, \
|
||||
MatchMixin
|
||||
from entropy.client.interfaces.fetch import FetchersMixin
|
||||
from entropy.client.interfaces.metadata import ExtractorsMixin
|
||||
from entropy.const import etpConst, etpCache
|
||||
from entropy.core import SystemSettings, SystemSettingsPlugin
|
||||
from entropy.exceptions import SystemDatabaseError
|
||||
|
||||
class ClientSystemSettingsPlugin(SystemSettingsPlugin):
|
||||
|
||||
@@ -70,8 +72,8 @@ class ClientSystemSettingsPlugin(SystemSettingsPlugin):
|
||||
system_settings_instance['repos_system_mask_installed'] = mask_installed
|
||||
system_settings_instance['repos_system_mask_installed_keys'] = mask_installed_keys
|
||||
|
||||
class Client(Singleton, TextInterface, Loaders, Cache, Calculators, \
|
||||
CRepository, Misc, Match, Fetchers, Extractors):
|
||||
class Client(Singleton, TextInterface, LoadersMixin, CacheMixin, CalculatorsMixin, \
|
||||
RepositoryMixin, MiscMixin, MatchMixin, FetchersMixin, ExtractorsMixin):
|
||||
|
||||
def init_singleton(self, indexing = True, noclientdb = 0,
|
||||
xcache = True, user_xcache = False, repo_validation = True,
|
||||
@@ -140,7 +142,7 @@ class Client(Singleton, TextInterface, Loaders, Cache, Calculators, \
|
||||
self.UGC = ugcClient(self)
|
||||
|
||||
# class init
|
||||
Loaders.__init__(self)
|
||||
LoadersMixin.__init__(self)
|
||||
|
||||
self.xcache = xcache
|
||||
shell_xcache = os.getenv("ETP_NOCACHE")
|
||||
|
||||
@@ -26,7 +26,7 @@ from entropy.exceptions import *
|
||||
from entropy.output import bold, darkgreen, darkred, blue, red
|
||||
from entropy.i18n import _
|
||||
|
||||
class Calculators:
|
||||
class CalculatorsMixin:
|
||||
|
||||
def dependencies_test(self, dbconn = None):
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from entropy.const import *
|
||||
from entropy.exceptions import *
|
||||
from entropy.output import purple, bold, red, blue, darkgreen, darkred, brown, darkblue
|
||||
|
||||
class Fetchers:
|
||||
class FetchersMixin:
|
||||
|
||||
def check_needed_package_download(self, filepath, checksum = None):
|
||||
# is the file available
|
||||
|
||||
@@ -23,7 +23,7 @@ from __future__ import with_statement
|
||||
from entropy.const import *
|
||||
from entropy.exceptions import *
|
||||
|
||||
class Loaders:
|
||||
class LoadersMixin:
|
||||
|
||||
__QA_cache = {}
|
||||
__security_cache = {}
|
||||
|
||||
@@ -27,7 +27,7 @@ from entropy.const import *
|
||||
from entropy.exceptions import *
|
||||
from entropy.output import red, bold, brown
|
||||
|
||||
class Extractors:
|
||||
class ExtractorsMixin:
|
||||
|
||||
def _extract_pkg_metadata_generate_extraction_dict(self):
|
||||
data = {
|
||||
|
||||
@@ -32,7 +32,7 @@ from entropy.db import dbapi2, LocalRepository
|
||||
from entropy.output import purple, bold, red, blue, darkgreen, darkred, brown
|
||||
|
||||
|
||||
class Repository:
|
||||
class RepositoryMixin:
|
||||
|
||||
__repo_error_messages_cache = set()
|
||||
__repodb_cache = {}
|
||||
@@ -765,7 +765,7 @@ class Repository:
|
||||
return self.disable_repository(repoid)
|
||||
|
||||
|
||||
class Misc:
|
||||
class MiscMixin:
|
||||
|
||||
def reload_constants(self):
|
||||
initconfig_entropy_constants(etpSys['rootdir'])
|
||||
@@ -1423,7 +1423,7 @@ class Misc:
|
||||
return self.switch_chroot(*args, **kwargs)
|
||||
|
||||
|
||||
class Match:
|
||||
class MatchMixin:
|
||||
|
||||
def get_package_action(self, match):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user