From 475ba3de6935bb52b5e4d9031ebeba59f322bd06 Mon Sep 17 00:00:00 2001 From: lxnay Date: Wed, 16 Apr 2008 15:02:16 +0000 Subject: [PATCH] Entropy/ServerInterface: - run treeupdates server-side for every opened repository git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1772 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/databaseTools.py | 2 +- libraries/entropy.py | 11 +++++++---- libraries/entropyConstants.py | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libraries/databaseTools.py b/libraries/databaseTools.py index dd27921c4..e9e978c7b 100644 --- a/libraries/databaseTools.py +++ b/libraries/databaseTools.py @@ -265,7 +265,7 @@ class etpDatabase: # check for /usr/portage/profiles/updates changes def serverUpdatePackagesData(self): - etpConst['treeupdatescalled'] = True + etpConst['server_treeupdatescalled'].add(self.server_repo) repo_updates_file = self.ServiceInterface.get_local_database_treeupdates_file(self.server_repo) doRescan = False diff --git a/libraries/entropy.py b/libraries/entropy.py index 921f42b97..42c0b8398 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -1435,7 +1435,10 @@ class EquoInterface(TextInterface): repo_pkgrev = 9999 if (deep_deps): - vcmp = self.entropyTools.entropyCompareVersions((repo_pkgver,repo_pkgtag,repo_pkgrev),(installedVer,installedTag,installedRev)) + vcmp = self.entropyTools.entropyCompareVersions( + (repo_pkgver,repo_pkgtag,repo_pkgrev), + (installedVer,installedTag,installedRev) + ) if vcmp != 0: depunsatisfied.add(dependency) else: @@ -1457,8 +1460,8 @@ class EquoInterface(TextInterface): depsatisfied.clear() ''' - unsatisfiedDeps.update(depunsatisfied) - satisfiedDeps.update(depsatisfied) + unsatisfiedDeps |= depunsatisfied + satisfiedDeps |= depsatisfied if self.xcache: try: @@ -11373,7 +11376,7 @@ class ServerInterface(TextInterface): # verify if we need to update the database to sync # with portage updates, we just ignore being readonly in the case - if not etpConst['treeupdatescalled'] and not just_reading: + if (repo not in etpConst['server_treeupdatescalled']) and (not just_reading): # sometimes, when filling a new server db, we need to avoid tree updates if valid: conn.serverUpdatePackagesData() diff --git a/libraries/entropyConstants.py b/libraries/entropyConstants.py index a5f87ac7b..3798898a9 100644 --- a/libraries/entropyConstants.py +++ b/libraries/entropyConstants.py @@ -632,6 +632,7 @@ def const_defaultSettings(rootdir): 'defaultumask': 022, 'storeumask': 002, 'treeupdatescalled': False, # to avoid running tree updates functions multiple times + 'server_treeupdatescalled': set(), 'spm': { 'exec': "/usr/bin/emerge", # source package manager executable 'ask_cmd': "--ask",