From 1e5e014b2cbf8877f7cb5f2a55cf900ed48f2c7a Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Sat, 20 Jun 2015 23:36:43 +0200 Subject: [PATCH] invoke yum --installroot with --releasever --- build.common | 1 + lbuild-initvm.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.common b/build.common index 6af85510..89540ed2 100644 --- a/build.common +++ b/build.common @@ -388,6 +388,7 @@ fi yum_options="$yum_options -y" yum_options="$yum_options -c $yum_conf" yum_options="$yum_options --installroot=$vroot" + yum_options="$yum_options --releasever=$releasever" # glibc must be specified explicitly for the correct arch to be # chosen. diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 6cb11231..7320e65d 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -129,7 +129,7 @@ function fedora_install() { fedora_download $cache || { echo "Failed to download 'fedora base'"; return 1; } else echo "Updating cache $cache/rootfs ..." - if ! yum --installroot $cache/rootfs -y --nogpgcheck update ; then + if ! yum --installroot $cache/rootfs --releasever $release -y --nogpgcheck update ; then echo "Failed to update 'fedora base', continuing with last known good cache" else echo "Update finished" @@ -208,7 +208,7 @@ function fedora_download() { # So ideally if we want to be able to build f12 images from f18 we need an rpm that has # this patch undone, like we have in place on our f14 boxes (our f14 boxes need a f18-like rpm) - YUM="yum --installroot=$INSTALL_ROOT --nogpgcheck -y" + YUM="yum --installroot=$INSTALL_ROOT --releasever=$release --nogpgcheck -y" echo "$YUM install $FEDORA_PREINSTALLED" $YUM install $FEDORA_PREINSTALLED || { echo "Failed to download rootfs, aborting." ; return 1; } -- 2.43.0