|
|
|
@ -721,13 +721,18 @@ class Britney(object):
|
|
|
|
|
dates = {}
|
|
|
|
|
filename = os.path.join(basedir, "Dates")
|
|
|
|
|
self.__log("Loading upload data from %s" % filename)
|
|
|
|
|
for line in open(filename):
|
|
|
|
|
l = line.split()
|
|
|
|
|
if len(l) != 3: continue
|
|
|
|
|
try:
|
|
|
|
|
dates[l[0]] = (l[1], int(l[2]))
|
|
|
|
|
except ValueError:
|
|
|
|
|
self.__log("Dates, unable to parse \"%s\"" % line, type="E")
|
|
|
|
|
try:
|
|
|
|
|
for line in open(filename):
|
|
|
|
|
l = line.split()
|
|
|
|
|
if len(l) != 3: continue
|
|
|
|
|
try:
|
|
|
|
|
dates[l[0]] = (l[1], int(l[2]))
|
|
|
|
|
except ValueError:
|
|
|
|
|
self.__log("Dates, unable to parse \"%s\"" % line,
|
|
|
|
|
type="E")
|
|
|
|
|
except IOError:
|
|
|
|
|
self.__log("%s missing; skipping date-based processing" % filename)
|
|
|
|
|
return None
|
|
|
|
|
return dates
|
|
|
|
|
|
|
|
|
|
def write_dates(self, basedir, dates):
|
|
|
|
@ -1327,7 +1332,7 @@ class Britney(object):
|
|
|
|
|
# permanence in unstable before updating testing; if the source package is too young,
|
|
|
|
|
# the check fails and we set update_candidate to False to block the update; consider
|
|
|
|
|
# the age-days hint, if specified for the package
|
|
|
|
|
if suite == 'unstable':
|
|
|
|
|
if suite == 'unstable' and self.dates is not None:
|
|
|
|
|
if src not in self.dates:
|
|
|
|
|
self.dates[src] = (source_u[VERSION], self.date_now)
|
|
|
|
|
elif not self.same_source(self.dates[src][0], source_u[VERSION]):
|
|
|
|
@ -1423,7 +1428,7 @@ class Britney(object):
|
|
|
|
|
else:
|
|
|
|
|
update_candidate = False
|
|
|
|
|
|
|
|
|
|
if self.date_now != self.dates[src][1]:
|
|
|
|
|
if self.dates is None or self.date_now != self.dates[src][1]:
|
|
|
|
|
excuse.addhtml(text)
|
|
|
|
|
|
|
|
|
|
# if the source package has no binaries, set update_candidate to False to block the update
|
|
|
|
@ -2449,7 +2454,8 @@ class Britney(object):
|
|
|
|
|
self.write_controlfiles(self.options.testing, 'testing')
|
|
|
|
|
|
|
|
|
|
# write dates
|
|
|
|
|
self.write_dates(self.options.testing, self.dates)
|
|
|
|
|
if self.dates is not None:
|
|
|
|
|
self.write_dates(self.options.testing, self.dates)
|
|
|
|
|
|
|
|
|
|
# write HeidiResult
|
|
|
|
|
self.write_heidi(self.options.heidi_output)
|
|
|
|
|