From 4cd0618c052750de17e21dadd723cf547eb1cf3b Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Tue, 29 Nov 2016 15:35:46 -0500 Subject: [PATCH] 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 --- .../cache-bindep/install.d/50-cache-pkgs | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100755 nodepool/elements/cache-bindep/install.d/50-cache-pkgs diff --git a/nodepool/elements/cache-bindep/install.d/50-cache-pkgs b/nodepool/elements/cache-bindep/install.d/50-cache-pkgs deleted file mode 100755 index 80fa341b89..0000000000 --- a/nodepool/elements/cache-bindep/install.d/50-cache-pkgs +++ /dev/null @@ -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 <