summaryrefslogtreecommitdiffstats
path: root/po
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-11-08 11:36:35 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-11-09 13:11:53 +0000
commit1efed122c07792f4c66a4083159cfacfb1893212 (patch)
treec751f26ec9d3c152905fdf34d48a2b79a0af5216 /po
parente8d937bd739a70394ec72482a8cb1df3b0601dcc (diff)
downloadlibguestfs-1efed122c07792f4c66a4083159cfacfb1893212.tar.gz
libguestfs-1efed122c07792f4c66a4083159cfacfb1893212.tar.xz
libguestfs-1efed122c07792f4c66a4083159cfacfb1893212.zip
lib: Rework temporary and cache directory code.
New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir. The current code has evolved over time and has a number of problems: (a) A single environment variable ($TMPDIR) controls the location of several directories. (b) It's hard for the library user to predict which directory libguestfs will use, unless the user simulates the same internal steps that libguestfs performs. This commit fixes these issues. (a) Now three environment variables control the location of all small temporary files, and the appliance cache: For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp. For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp. The user can also set these directories explicitly through API calls (guestfs_set_tmpdir and guestfs_set_cachedir). (b) The user can also retrieve the actual directories that libguestfs will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir. These functions are also used internally. This commit also: - reworks the internal tmpdir code - removes the internal (undocumented) guestfs_tmpdir call (replacing it with calls to the documented guestfs_get_tmpdir API instead) - changes the ./run script to set LIBGUESTFS_TMPDIR and LIBGUESTFS_CACHEDIR - adds a test - fixes a few places like libguestfs-make-fixed-appliance which depended on $TMPDIR
Diffstat (limited to 'po')
-rw-r--r--po/POTFILES1
1 files changed, 1 insertions, 0 deletions
diff --git a/po/POTFILES b/po/POTFILES
index 3b2c89c5..fcaa77ce 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -254,6 +254,7 @@ src/libvirt-domain.c
src/listfs.c
src/match.c
src/proto.c
+src/tmpdirs.c
test-tool/test-tool.c
tools/virt-list-filesystems.pl
tools/virt-list-partitions.pl