This was always the intent. However, the structure here arranged to
put the actual value of GNUPGHOME into the import script.
Instead, move the GNUGPHOME setting into the setup fragment, which is
evaluated by the importer.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
cp $troot/gnupg/* $tmp/gnupg
chmod go-rw $tmp/gnupg/*
-export GNUPGHOME=$tmp/gnupg
+setup='
+ export GNUPGHOME=$tmp/gnupg
-cat >$tmp/gnupg/gpg-agent.conf <<END
-log-file $tmp/gnupg/AGENT.log
+ cat >$tmp/gnupg/gpg-agent.conf <<END
+ log-file $tmp/gnupg/AGENT.log
END
-#debug-all
+ #debug-all
-setup='
: ${DGIT_TEST_REAL_GPG_AGENT:=$(type -p gpg-agent)}
export DGIT_TEST_REAL_GPG_AGENT=$(type -p gpg-agent)
export DGIT_STUNT_AGENT=$troot/tstunt/gpg-agent
- export GNUPGHOME
t-tstunt gpg
'
gpg --list-secret
-t-setup-done 'GNUPGHOME' 'gnupg' "$setup"
+t-setup-done '' 'gnupg' "$setup"
t-ok