• Home
  • Raw
  • Download

Lines Matching full:repo

39 def parse_ssh_path(repo):  argument
45 match = re.search('^ssh://(.*?)(/.*)$', repo)
50 "Incorrect SSH path in global_config: %s" % repo)
53 def repo_run_command(repo, cmd, ignore_status=False, cd=True): argument
55 repo = repo.strip()
58 if repo.startswith('ssh://'):
60 hostline, remote_path = parse_ssh_path(repo)
71 cd_str = 'cd %s && ' % repo
78 def create_directory(repo): argument
79 remote_path = repo
80 if repo.startswith('ssh://'):
81 _, remote_path = parse_ssh_path(repo)
82 repo_run_command(repo, 'mkdir -p %s' % remote_path, cd=False)
85 def check_diskspace(repo, min_free=None): argument
92 df = repo_run_command(repo,
96 raise error.RepoUnknownError('Unknown Repo Error: %s' % e)
102 def check_write(repo): argument
105 repo_run_command(repo, 'touch %s' % repo_testfile).stdout.strip()
106 repo_run_command(repo, 'rm ' + repo_testfile)
108 raise error.RepoWriteError('Unable to write to ' + repo)
111 def trim_custom_directories(repo, older_than_days=None): argument
112 if not repo:
119 repo_run_command(repo, cmd, ignore_status=True)
192 # do a quick test to verify the repo is reachable
302 def add_repository(self, repo): argument
303 if isinstance(repo, basestring):
304 self.repositories.append(self.get_fetcher(repo))
305 elif isinstance(repo, RepositoryFetcher):
306 self.repositories.append(repo)
308 raise TypeError("repo must be RepositoryFetcher or url string")
337 def repo_check(self, repo): argument
339 Check to make sure the repo is in a sane state:
341 Make sure we can write to the repo
343 if not repo.startswith('/') and not repo.startswith('ssh:'):
346 create_directory(repo)
347 check_diskspace(repo)
348 check_write(repo)
351 raise error.RepoError("ERROR: Repo %s: %s" % (repo, e))
491 # The package could not be found in this repo, continue looking
494 repo_url_list = [repo.url for repo in repositories]