summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/gpgv.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-28 00:31:01 +0100
committerMichael Vogt <mvo@debian.org>2013-12-28 00:31:01 +0100
commit35ac30ee373c5ed84d7c2c5a701ac2d54963504d (patch)
tree59da7e2385b396052c4f53ac187d520c00d2790c /apt-pkg/contrib/gpgv.cc
parente5c2b7e8a5455e1dc6993ef9e151b3845fb53c60 (diff)
parentc035b6552ba4bd1c6fba5fd8f8d829c2efbefe3c (diff)
Merge branch 'debian/sid' into bugfix/bts731738-fancy-progess
Conflicts: apt-pkg/install-progress.cc
Diffstat (limited to 'apt-pkg/contrib/gpgv.cc')
-rw-r--r--apt-pkg/contrib/gpgv.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc
index f47e7ea48..f57a72d86 100644
--- a/apt-pkg/contrib/gpgv.cc
+++ b/apt-pkg/contrib/gpgv.cc
@@ -10,6 +10,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <unistd.h>
#include<apt-pkg/configuration.h>
#include<apt-pkg/error.h>
@@ -21,16 +22,9 @@
/*}}}*/
static char * GenerateTemporaryFileTemplate(const char *basename) /*{{{*/
{
- const char *tmpdir = getenv("TMPDIR");
-#ifdef P_tmpdir
- if (!tmpdir)
- tmpdir = P_tmpdir;
-#endif
- if (!tmpdir)
- tmpdir = "/tmp";
-
std::string out;
- strprintf(out, "%s/%s.XXXXXX", tmpdir, basename);
+ std::string tmpdir = GetTempDir();
+ strprintf(out, "%s/%s.XXXXXX", tmpdir.c_str(), basename);
return strdup(out.c_str());
}
/*}}}*/