From a373cc73444cbcd8c30cab1266a0d87745dfef86 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Fri, 11 Mar 2011 17:56:41 -0500 Subject: [PATCH] get all gpg keys from the file. SL has multiple of them --- build.common | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/build.common b/build.common index e2ddfc89..27c76064 100644 --- a/build.common +++ b/build.common @@ -320,8 +320,6 @@ EOF mkdir -p $vroot/var/lib/rpm rpm --root $vroot --initdb rpm --root $vroot --import $public_gpg_key - echo "DEBUG" - echo "rpm --root $vroot --import $public_gpg_key" # Initialize yum in reference image mkdir -p $vroot/var/cache/yum $vroot/var/log @@ -749,13 +747,11 @@ $kexclude_line" $template > $dest_yumconf return 0 } -# from a yum.conf as generated above, computes the (first) gpgkey url +# from a yum.conf as generated above, computes the gpgkey urls function yumconf_gpgkey () { dest_yumconf=$1; shift - first_line=$(grep '^gpgkey=' $dest_yumconf | head -1) - values=$(echo $first_line | sed -e s,gpgkey=,,) - value=$(echo $values | sed -e 's,$basearch,'"$pl_DISTRO_ARCH",g) + values=$(grep -h '^gpgkey=' $dest_yumconf | sed -e s,gpgkey=,, | sed -e 's,$basearch,'"$pl_DISTRO_ARCH",g | xargs) [ -n "$value" ] || return 1 echo $value return 0 -- 2.45.2