From 562e734824795ec0f04be4ea3512036d5ddd4cf5 Mon Sep 17 00:00:00 2001
From: Julien Leduc <julien.leduc@cern.ch>
Date: Fri, 15 Mar 2019 13:00:03 +0100
Subject: [PATCH] Going for the same strategy as Puppet by disabling
 protectbase in all repositories.

---
 .gitlab-ci.yml                                               | 2 ++
 .../docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo       | 1 -
 .../docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo       | 5 -----
 .../ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.repo  | 1 -
 4 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0fb0846693..52e2e24928 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,6 +13,8 @@ before_script:
   - echo "Exporting CTA_BUILD_ID=${CTA_BUILD_ID}"
   - test -n "${CI_COMMIT_TAG}" && export TAG_VERSION=$(echo ${CI_COMMIT_TAG} | sed -e 's/^v//;s/-.*$//')
   - test -n "${CI_COMMIT_TAG}" && export TAG_RELEASE=$(echo ${CI_COMMIT_TAG} | sed -e 's/^[^-]*-//')
+  - echo "Removing protectbase from all repos (same as Puppet)"
+  - sed -i '/^protect=/d' /etc/yum.repos.d/* 
 
 cta_srpm:
   stage: build:srpm
diff --git a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo
index fe3a841542..1a0bd6a90c 100644
--- a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo
+++ b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo
@@ -1,7 +1,6 @@
 [castor]
 name=CASTOR Repositories in LINUXSOFT
 baseurl=http://linuxsoft.cern.ch/internal/repos/castor7-testing/$basearch/os
-protect=1
 priority=2
 enabled=0
 gpgcheck=0
diff --git a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo
index 1d87e84b6a..9d6003a5c1 100644
--- a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo
+++ b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo
@@ -1,7 +1,6 @@
 [cta-ci-castor]
 name=CTA CI repo castor cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/castor/
-protect=1
 priority=2
 gpgcheck=0
 enabled=1
@@ -9,7 +8,6 @@ enabled=1
 [cta-ci-ceph]
 name=CTA CI repo ceph cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/ceph/
-protect=1
 priority=3
 gpgcheck=0
 enabled=1
@@ -24,7 +22,6 @@ enabled=1
 [cta-ci-eos]
 name=CTA CI repo eos cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/eos/
-protect=1
 priority=4
 gpgcheck=0
 enabled=1
@@ -32,7 +29,6 @@ enabled=1
 [cta-ci-others]
 name=CTA CI repo any additional needed RPM cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/others/
-protect=1
 priority=4
 gpgcheck=0
 enabled=1
@@ -40,7 +36,6 @@ enabled=1
 [cta-ci-xroot]
 name=CTA CI repo xroot cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/xroot/
-protect=1
 priority=4
 gpgcheck=0
 enabled=1
diff --git a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.repo b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.repo
index 0adaba2ae9..95b7880043 100644
--- a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.repo
+++ b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.repo
@@ -1,7 +1,6 @@
 [eos-citrine-depend]
 name=EOS Citrine depend
 baseurl=http://storage-ci.web.cern.ch/storage-ci/eos/citrine-depend/el-7/x86_64/
-protect=1
 priority=2
 gpgcheck=0
 enabled=1
-- 
GitLab