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:
@@ -118,13 +118,13 @@ class HistoryDB(lazydb.LazyDB):
|
|||||||
hist.operation.no = int(log.split("_")[0])
|
hist.operation.no = int(log.split("_")[0])
|
||||||
yield hist.operation
|
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 = filter(lambda l:l.endswith("repoupdate.xml"), self.__logs)
|
||||||
repoupdates.reverse()
|
repoupdates.reverse()
|
||||||
if not len(repoupdates) >= 2:
|
if not len(repoupdates) >= 2:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if last != -1 and len(repoupdates) <= last:
|
if last != 1 and len(repoupdates) <= last:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
hist = pisi.history.History(os.path.join(ctx.config.history_dir(), repoupdates[-last]))
|
hist = pisi.history.History(os.path.join(ctx.config.history_dir(), repoupdates[-last]))
|
||||||
|
|||||||
Reference in New Issue
Block a user