Fix a default "pisi ln" bug... was setting the since date to the earliest repo update instead should set it to the

last repo update's date.
This commit is contained in:
Faik Uygur
2009-06-19 09:19:23 +00:00
parent 9a194f9e2e
commit f617c0a8e2
+2 -2
View File
@@ -118,13 +118,13 @@ class HistoryDB(lazydb.LazyDB):
hist.operation.no = int(log.split("_")[0])
yield hist.operation
def get_last_repo_update(self, last=-1):
def get_last_repo_update(self, last=1):
repoupdates = filter(lambda l:l.endswith("repoupdate.xml"), self.__logs)
repoupdates.reverse()
if not len(repoupdates) >= 2:
return None
if last != -1 and len(repoupdates) <= last:
if last != 1 and len(repoupdates) <= last:
return None
hist = pisi.history.History(os.path.join(ctx.config.history_dir(), repoupdates[-last]))