Allow definition of index max age in repo config

This commit is contained in:
Ciaran Gultnieks 2013-11-26 22:07:47 +00:00
parent dad763a86c
commit 7cc21fe89a
3 changed files with 13 additions and 1 deletions

View file

@ -467,11 +467,15 @@ def make_index(apps, apks, repodir, archive, categories):
repoel = doc.createElement("repo")
if archive:
repoel.setAttribute("name", config['archive_name'])
if config['repo_maxage'] != 0:
repoel.setAttribute("maxage", str(config['repo_maxage']))
repoel.setAttribute("icon", os.path.basename(config['archive_icon']))
repoel.setAttribute("url", config['archive_url'])
addElement('description', config['archive_description'], doc, repoel)
else:
repoel.setAttribute("name", config['repo_name'])
if config['repo_maxage'] != 0:
repoel.setAttribute("maxage", str(config['repo_maxage']))
repoel.setAttribute("icon", os.path.basename(config['repo_icon']))
repoel.setAttribute("url", config['repo_url'])
addElement('description', config['repo_description'], doc, repoel)