Exemple #1
0
    def __init__(self, path):
        ''' The constructor needs the path to the repo database file '''
        Msg.process(_('Loading repo database:'), path)

        try:
            self.repo = Repo(path)
        except Exception as e:
            Msg.error(str(e))
            LocalRepo.shutdown(True)
Exemple #2
0
 def init(path, config_file=Config.CONFIGFILE):
     ''' Needs the path to repo, or the repo name if specified in the config file '''
     try:
         Config.init(path, config_file)
         LocalRepo._repo = Repo(Config.get('path', path))
         Log.init(LocalRepo._repo.path)
         BuildLog.init(LocalRepo._repo.path)
         PkgbuildLog.init(LocalRepo._repo.path)
     except LocalRepoError as e:
         LocalRepo.error(e)