Build mirror using proper requirements.

* tools/integration.sh: Use the --no-update flag to run-mirror to make
sure that the repo checked out by devstack-gate is the repo used to
build the mirror. Otherwise `git reset --hard remote/origin/master` is
used which we do not want. Also, we can't update the requirements repo
until integration.sh is working and for that we need to install d2to1
into the mirror. Usually this would require a requirements repo change,
but chicken and egg. Force it in along with pip and setuptools instead.
This can be removed when d2to1 is added to the requirements repo.

Change-Id: Id5c2c902832e475f28310fdd547672464bf42c0c
This commit is contained in:
Clark Boylan 2013-12-05 13:10:37 -08:00
parent e7878f2171
commit 31833080e0
1 changed files with 7 additions and 3 deletions

View File

@ -113,7 +113,11 @@ pbrsdistdir=$tmpdir/pbrsdist
git clone $REPODIR/pbr $pbrsdistdir
cd $pbrsdistdir
$pypimirrorvenv/bin/run-mirror -b remotes/origin/master --verbose -c $tmpdir/mirror.yaml --no-process --export=$HOME/mirror_package_list.txt
# Note the -b argument here is essentially a noop as
# --no-update is passed as well. The one thing the -b
# does give us is it makes run-mirror install dependencies
# once instead of over and over for all branches it can find.
$pypimirrorvenv/bin/run-mirror -b remotes/origin/master --no-update --verbose -c $tmpdir/mirror.yaml --no-process --export=$HOME/mirror_package_list.txt
# Compare packages in the mirror with the list of requirements
gen_bare_package_list "$REPODIR/requirements/global-requirements.txt $REPODIR/requirements/dev-requirements.txt" > bare_all_requirements.txt
gen_bare_package_list $HOME/mirror_package_list.txt > bare_mirror_package_list.txt
@ -121,12 +125,12 @@ echo "Diff between python mirror packages and requirements packages:"
grep -v -f bare_all_requirements.txt bare_mirror_package_list.txt > diff_requirements_mirror.txt
cat diff_requirements_mirror.txt
$pypimirrorvenv/bin/pip install -i http://pypi.python.org/simple -d $tmpdownload/pip/openstack 'pip==1.0' 'setuptools>=0.7'
$pypimirrorvenv/bin/pip install -i http://pypi.python.org/simple -d $tmpdownload/pip/openstack 'pip==1.0' 'setuptools>=0.7' 'd2to1'
$pypimirrorvenv/bin/pip install -i http://pypi.python.org/simple -d $tmpdownload/pip/openstack -r requirements.txt
$pypimirrorvenv/bin/python setup.py sdist -d $tmpdownload/pip/openstack
$pypimirrorvenv/bin/run-mirror -b remotes/origin/master --verbose -c $tmpdir/mirror.yaml --no-download
$pypimirrorvenv/bin/run-mirror -b remotes/origin/master --no-update --verbose -c $tmpdir/mirror.yaml --no-download
find $pypidir -type f -name '*.html' -delete
find $pypidir