From ba5aa8725ea5b1d16f784a9217d30718cd975884 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Tue, 10 Dec 2013 17:24:03 +0100 Subject: [PATCH] Fix $TARGET_ROOT usage in yum element Fix the test for $TARGET_ROOT in root.d/50-yum-cache. Don't use $TARGET_ROOT in pre-install, it's only set for "root" and "cleanup". Change-Id: I048364ea08ef503a4466f3494f18f72ebf99b5c2 --- elements/yum/pre-install.d/01-yum-keepcache | 6 ++---- elements/yum/root.d/50-yum-cache | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/elements/yum/pre-install.d/01-yum-keepcache b/elements/yum/pre-install.d/01-yum-keepcache index 2ada3e0b..e5d7b145 100755 --- a/elements/yum/pre-install.d/01-yum-keepcache +++ b/elements/yum/pre-install.d/01-yum-keepcache @@ -2,7 +2,5 @@ set -e -[ -n "TARGET_ROOT" ] - -sudo sed -i 's/keepcache=0/keepcache=1/' $TARGET_ROOT/etc/yum.conf -sudo sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' $TARGET_ROOT/etc/yum.conf +sudo sed -i 's/keepcache=0/keepcache=1/' /etc/yum.conf +sudo sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' /etc/yum.conf diff --git a/elements/yum/root.d/50-yum-cache b/elements/yum/root.d/50-yum-cache index f7dd9247..a1e43a55 100755 --- a/elements/yum/root.d/50-yum-cache +++ b/elements/yum/root.d/50-yum-cache @@ -2,7 +2,7 @@ set -e -[ -n "TARGET_ROOT" ] +[ -n "$TARGET_ROOT" ] YUM_CACHE_DIR=~/.cache/image-create/yum mkdir -p $YUM_CACHE_DIR