Remove 50-cache-pkgs from cache-bindep

Today each mirror region has an AFS mirror cache of packaging, as a
result lets try having jobs use it over caching bindep.txt
dependencies on our images.

This should save us about 27mins in diskimage build times for
ubuntu-trusty and ubuntu-xenial.

Change-Id: I74ad0fdbd939948d9285dcd7ef839bdbe299319f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-11-29 15:35:46 -05:00
parent cd058b9b2e
commit 4cd0618c05

View File

@ -1,67 +0,0 @@
#!/bin/bash
# Copyright (C) 2011-2015 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
# dib-lint: disable=setu setpipefail
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -e
# Build up a list of packages to install by concatenating bindep lists
FALLBACKREPO=/opt/git/openstack-infra/project-config
FALLBACKFILE=jenkins/data/bindep-fallback.txt
PACKAGES=`git --git-dir=$FALLBACKREPO/.git show master:$FALLBACKFILE`
# NOTE(pabelanger): We currently don't gate on bindep.txt/other-requirements.txt
# for centos and fedora nodes. As such, we have no way to ensure this will
# not break DIB process. So we only run this for ubuntu-trusty.
# bindep.txt is new filename, other-requirements.txt is the old one. We should
# handle both for now.
if [ -f /usr/bin/apt-get ] ; then
for REPO in /opt/git/*/* ; do
BRANCHES=`git --git-dir=$REPO/.git branch -r | grep '^ origin/[^H]'`
for BRANCH in $BRANCHES ; do
for reqsfile in bindep.txt other-requirements.txt ; do
REQS=`git --git-dir=$REPO/.git show $BRANCH:$reqsfile 2>/dev/null \
|| true`
if [ -n "$REQS" ] ; then
PACKAGES=`echo -e "$PACKAGES\n$REQS" | sort -u`
fi
done
done
done
fi
PACKAGELIST=`echo "$PACKAGES" | /usr/bindep-env/bin/bindep -b -f - || true`
if [ -f /usr/bin/apt-get ] ; then
# --ignore-missing conflicts with set -e, so force it to be ok
apt-get -y --ignore-missing -d install $PACKAGELIST || true
elif [ -f /usr/bin/emerge ] ; then
# write out use config (won't install/fetch without it)
# This lays down install / compile time options needed for bindep to
# install / fetch the needed packages.
USE_FILE=/etc/portage/package.use/bindep.use
cat > $USE_FILE <<EOF
x11-libs/cairo X
x11-libs/gdk-pixbuf X
media-libs/gd truetype png fontconfig jpeg
EOF
emerge -q --fetchonly $PACKAGELIST || true
else
${YUM:-yum} install -y --downloadonly $PACKAGELIST
fi