From: S.Çağlar Onur Date: Fri, 11 Mar 2011 22:56:41 +0000 (-0500) Subject: get all gpg keys from the file. SL has multiple of them X-Git-Tag: 5.0-rc21~45 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=a373cc73444cbcd8c30cab1266a0d87745dfef86;p=build.git get all gpg keys from the file. SL has multiple of them --- 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