git://git.onelab.eu
/
build.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2fa6474
)
get all gpg keys from the file. SL has multiple of them
author
S.Çağlar Onur
<caglar@verivue.com>
Fri, 11 Mar 2011 22:56:41 +0000
(17:56 -0500)
committer
S.Çağlar Onur
<caglar@verivue.com>
Fri, 11 Mar 2011 22:56:41 +0000
(17:56 -0500)
build.common
patch
|
blob
|
history
diff --git
a/build.common
b/build.common
index
e2ddfc8
..
27c7606
100644
(file)
--- 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
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
# 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
}
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
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
[ -n "$value" ] || return 1
echo $value
return 0