Entropy/Server Interface:
- export binary packages expiration days setting to server.conf git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2339 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -12,6 +12,19 @@
|
||||
#
|
||||
branches|3.5
|
||||
|
||||
#
|
||||
# Packages expiration days:
|
||||
# expiration-days|<number>
|
||||
#
|
||||
#
|
||||
# Number of days after a binary package will be removed from its belonging repository if not available anymore (old files)
|
||||
#
|
||||
# example:
|
||||
# expiration-days|15
|
||||
#
|
||||
# expiration-days|<internal value>
|
||||
|
||||
|
||||
#
|
||||
# syntax for officialserverrepositoryid:
|
||||
#
|
||||
@@ -30,4 +43,4 @@ officialserverrepositoryid|sabayonlinux.org
|
||||
# example:
|
||||
#| repository|sabayonlinux.org|Sabayon Linux Official Repository|ftp://user:pass@111.111.111.111/|http://svn.sabayonlinux.org/entropy|svn.sabayonlinux.org#1026,1027
|
||||
#
|
||||
# repository|
|
||||
# repository|
|
||||
|
||||
@@ -1369,6 +1369,14 @@ def const_readServerSettings():
|
||||
elif (line.find("officialserverrepositoryid|") != -1) and (not line.startswith("#")) and (len(line.split("|")) == 2):
|
||||
etpConst['officialserverrepositoryid'] = line.split("|")[1].strip()
|
||||
|
||||
elif (line.find("expiration-days|") != -1) and (not line.startswith("#")) and (len(line.split("|")) == 2):
|
||||
mydays = line.split("|")[1].strip()
|
||||
try:
|
||||
mydays = int(mydays)
|
||||
etpConst['packagesexpirationdays'] = mydays
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
elif line.startswith("repository|") and (len(line.split("|")) in [5,6]):
|
||||
|
||||
repoid, repodata = const_extractServerRepositoryParameters(line)
|
||||
|
||||
Reference in New Issue
Block a user