commit:     5db00ff1e743cc7383849cea9434a7d5df3b80e0
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat May 25 13:35:37 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat May 25 13:35:37 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5db00ff1

tests/qmanifest: move GNUPG homedir to TMPDIR

Hopefully, TMPDIR is shorter than our T.  gpgme is pretty annoying when
it comes to paths, it often considers a path to be too long, so we need
to keep it to a minimum.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qmanifest/dotest | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/qmanifest/dotest b/tests/qmanifest/dotest
index 9d28133..4e8c66f 100755
--- a/tests/qmanifest/dotest
+++ b/tests/qmanifest/dotest
@@ -44,9 +44,10 @@ test 05 1 "qmanifest -o notatree"
 # generate a valid tree
 rm -Rf testtree
 cp -r "${ROOT}/simpletree" testtree || echo try it anyway
-export HOME=${ROOT}  # for gnupg home
+export HOME=$(mktemp -d)  # for gnupg home
+cp -r "${ROOT}/.gnupg" "${HOME}/"
 # silence gpg warnings
-chmod -R og-rwx "${ROOT}"/.gnupg
+chmod -R og-rwx "${HOME}"/.gnupg
 # make it a fully valid tree
 rm testtree/my-cat/mypackage/unrecorded-file
 # drop ROOT, we'll work here in T
@@ -60,6 +61,7 @@ test 07 0 "qmanifest testtree | sed -e '/Manifest 
timestamp/d' -e 's/made .* UTC
 
 # shut down agents and whatnot
 gpgconf --kill all
+rm -Rf "${HOME}"
 
 cleantmpdir
 

Reply via email to