Don't double-include if global-requirements

global-requirements is a fully self-contained file, containing both
test and normal requirements. In the situation where the target repo
has a global-requirements.txt file, it should be treated as the only
file that matters- otherwise the mirror builder will hit double include
issues.

Change-Id: I01fd1e0d7f0923456f35a0f931159850cb52e3e7
This commit is contained in:
Monty Taylor 2013-08-03 17:02:06 -04:00
parent 38411d4dcb
commit ad88b02851
1 changed files with 9 additions and 7 deletions

View File

@ -208,13 +208,15 @@ class Mirror(object):
out = self.run_command("git reset --hard %s" % branch)
out = self.run_command("git clean -x -f -d -q")
reqlist = []
for requires_file in ("global-requirements.txt",
"requirements.txt",
"test-requirements.txt",
"tools/pip-requires",
"tools/test-requires"):
if os.path.exists(requires_file):
reqlist.append(requires_file)
if os.path.exists('global-requirements.txt'):
reqlist.append('global-requirements.txt')
else:
for requires_file in ("requirements.txt",
"test-requirements.txt",
"tools/pip-requires",
"tools/test-requires"):
if os.path.exists(requires_file):
reqlist.append(requires_file)
if reqlist:
out = self.run_command(venv_format %
(pip_cache_dir, venv))