On Tuesday, November 5, 2019 at 4:03:27 PM UTC+5:30, vijai kumar wrote:
From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
CI triggers the build in a chrooted environment with userspec
option set to host user. GPG commands would fail since we donot have
access to the $HOME folder in chroot.
Make GNUPGHOME available to avoid failures due to permission issues.
Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
Hi Baurzhan,
This patch should fix the issue we are facing in CI.
There is a job running successfully with this patchset at
http://ci.isar-build.org:8080/job/isar_vkk_devel/10/consoleFull
Thanks,
Vijai Kumar K
meta/recipes-devtools/base-apt/base-apt.bb | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb
index 42ff782..9a0f7c8 100644
--- a/meta/recipes-devtools/base-apt/base-apt.bb
+++ b/meta/recipes-devtools/base-apt/base-apt.bb
@@ -14,6 +14,10 @@ do_cache_config[lockfiles] = "${REPO_BASE_DIR}/isar.lock"
# Generate reprepro config for current distro if it doesn't exist. Once it's
# generated, this task should do nothing.
repo_config() {
+ if [ -n "${GNUPGHOME}" ]; then
+ export GNUPGHOME="${GNUPGHOME}"
+ fi
+
if [ ! -e "${CACHE_CONF_DIR}/distributions" ]; then
sed -e "s#{CODENAME}#"${BASE_DISTRO_CODENAME}"#g" \
${WORKDIR}/distributions.in > ${CACHE_CONF_DIR}/distributions
@@ -32,9 +36,6 @@ repo_config() {
path_databases="${REPO_BASE_DB_DIR}/${BASE_DISTRO}"
if [ ! -d "${path_databases}" ]; then
- if [ -n "${GNUPGHOME}" ]; then
- export GNUPGHOME="${GNUPGHOME}"
- fi
reprepro -b ${path_cache} \
--dbdir ${path_databases} \
export ${BASE_DISTRO_CODENAME}
--
2.17.1