repos: Save load timestamp in the repository

This commit is contained in:
Ivan A. Melnikov 2023-10-23 14:22:20 +04:00
parent 816ff27123
commit 1ad8c35682

View File

@ -6,6 +6,7 @@ import graphlib
import itertools
import logging
import re
import time
import rpm
@ -186,6 +187,7 @@ PKG_BUILD_LIST = tuple(Dependency.from_names(
class Repository:
def __init__(self, repo_name, sources, binaries, bits):
self._config = None
self.name = repo_name
self.sources = sources
self.binaries = binaries
@ -195,6 +197,7 @@ class Repository:
self.reverse_prov_addon = {}
self.base_chroot = None
self.build_chroot = None
self.timestamp = None
self.update_indexes()
@ -227,6 +230,7 @@ class Repository:
self.build_chroot = None
self.base_chroot = self.chroot_for(PKG_INIT_LIST, build=False)
self.build_chroot = self.chroot_for(PKG_BUILD_LIST, build=False)
self.timestamp = time.time()
@classmethod
def load(cls, repo_name, path, arch, components=DEFAULT_COMPONENTS):