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:
parent
38411d4dcb
commit
ad88b02851
@ -208,13 +208,15 @@ class Mirror(object):
|
|||||||
out = self.run_command("git reset --hard %s" % branch)
|
out = self.run_command("git reset --hard %s" % branch)
|
||||||
out = self.run_command("git clean -x -f -d -q")
|
out = self.run_command("git clean -x -f -d -q")
|
||||||
reqlist = []
|
reqlist = []
|
||||||
for requires_file in ("global-requirements.txt",
|
if os.path.exists('global-requirements.txt'):
|
||||||
"requirements.txt",
|
reqlist.append('global-requirements.txt')
|
||||||
"test-requirements.txt",
|
else:
|
||||||
"tools/pip-requires",
|
for requires_file in ("requirements.txt",
|
||||||
"tools/test-requires"):
|
"test-requirements.txt",
|
||||||
if os.path.exists(requires_file):
|
"tools/pip-requires",
|
||||||
reqlist.append(requires_file)
|
"tools/test-requires"):
|
||||||
|
if os.path.exists(requires_file):
|
||||||
|
reqlist.append(requires_file)
|
||||||
if reqlist:
|
if reqlist:
|
||||||
out = self.run_command(venv_format %
|
out = self.run_command(venv_format %
|
||||||
(pip_cache_dir, venv))
|
(pip_cache_dir, venv))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user