[entropy.server] add server-side support for per-repository package keywords file

This commit is contained in:
Fabio Erculiani
2009-08-18 13:19:27 +02:00
parent d54ab4b231
commit e6e277502d
2 changed files with 14 additions and 0 deletions
@@ -2631,6 +2631,12 @@ class Server(Singleton, TextInterface):
return os.path.join(self.get_local_database_dir(repo, branch),
etpConst['etpdatabasecriticalfile'])
def get_local_database_keywords_file(self, repo = None, branch = None):
if repo == None:
repo = self.default_repository
return os.path.join(self.get_local_database_dir(repo, branch),
etpConst['etpdatabasekeywordsfile'])
def get_local_database_dir(self, repo = None, branch = None):
srv_set = self.SystemSettings[self.sys_settings_plugin_id]['server']
if repo == None:
@@ -1227,6 +1227,14 @@ class Server:
if not download:
critical.append(data['critical_updates_file'])
keywords_file = self.Entropy.get_local_database_keywords_file(
repo)
if os.path.isfile(keywords_file) or download:
data['keywords_file'] = keywords_file
extra_text_files.append(data['keywords_file'])
if not download:
critical.append(data['keywords_file'])
# EAPI 2,3
if not download: # we don't need to get the dump