[svn] GnuPG - r4920 - in trunk: doc jnlib po tools
svn author wk
cvs at cvs.gnupg.org
Tue Jan 20 20:24:25 CET 2009
Author: wk
Date: 2009-01-20 20:24:24 +0100 (Tue, 20 Jan 2009)
New Revision: 4920
Modified:
trunk/doc/tools.texi
trunk/jnlib/stringhelp.c
trunk/po/de.po
trunk/tools/ChangeLog
trunk/tools/gpgconf.c
Log:
Print more directories with gpgconf --list-dirs.
Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog 2009-01-19 16:15:30 UTC (rev 4919)
+++ trunk/tools/ChangeLog 2009-01-20 19:24:24 UTC (rev 4920)
@@ -1,3 +1,7 @@
+2009-01-20 Werner Koch <wk at g10code.com>
+
+ * gpgconf.c (main): Print more directories.
+
2008-12-09 Werner Koch <wk at g10code.com>
* gpg-check-pattern.c (main): Call i18n_init before
Modified: trunk/doc/tools.texi
===================================================================
--- trunk/doc/tools.texi 2009-01-19 16:15:30 UTC (rev 4919)
+++ trunk/doc/tools.texi 2009-01-20 19:24:24 UTC (rev 4920)
@@ -239,10 +239,13 @@
@item --list-dirs
Lists the directories used by @command{gpgconf}. One directory is
-listed per line, and each line consists of a colon-separated list
-where the first field names the directory type (for example
- at code{sysconfdir}) and the second field contains the percent-escaped
-directory.
+listed per line, and each line consists of a colon-separated list where
+the first field names the directory type (for example @code{sysconfdir})
+and the second field contains the percent-escaped directory. Although
+they are not directories, the socket file names used by
+ at command{gpg-agent} and @command{dirmngr} are printed as well. Note
+that the socket file names and the @code{homedir} lines are the default
+names and they may be overridden by command line switches.
@item --list-config [@var{filename}]
List the global configuration file in a colon separated format. If
Modified: trunk/jnlib/stringhelp.c
===================================================================
--- trunk/jnlib/stringhelp.c 2009-01-19 16:15:30 UTC (rev 4919)
+++ trunk/jnlib/stringhelp.c 2009-01-20 19:24:24 UTC (rev 4920)
@@ -314,8 +314,8 @@
/* Implementation of make_filename and make_filename_try. We need to
- use macros here toa void the use of the soemtimes problematic
- va_copy fucntion which is not available on all systems. */
+ use macros here to avoid the use of the sometimes problematic
+ va_copy function which is not available on all systems. */
#define MAKE_FILENAME_PART1 \
va_list arg_ptr; \
size_t n; \
Modified: trunk/po/de.po [not shown]
Modified: trunk/tools/gpgconf.c
===================================================================
--- trunk/tools/gpgconf.c 2009-01-19 16:15:30 UTC (rev 4919)
+++ trunk/tools/gpgconf.c 2009-01-20 19:24:24 UTC (rev 4920)
@@ -258,12 +258,51 @@
break;
case aListDirs:
- /* Show the system configuration directory for gpgconf. */
+ /* Show the system configuration directories for gpgconf. */
get_outfp (&outfp);
fprintf (outfp, "sysconfdir:%s\n",
gc_percent_escape (gnupg_sysconfdir ()));
fprintf (outfp, "bindir:%s\n",
gc_percent_escape (gnupg_bindir ()));
+ fprintf (outfp, "libexecdir:%s\n",
+ gc_percent_escape (gnupg_libexecdir ()));
+ fprintf (outfp, "libdir:%s\n",
+ gc_percent_escape (gnupg_libdir ()));
+ fprintf (outfp, "datadir:%s\n",
+ gc_percent_escape (gnupg_datadir ()));
+ fprintf (outfp, "localedir:%s\n",
+ gc_percent_escape (gnupg_localedir ()));
+ fprintf (outfp, "dirmngr-socket:%s\n",
+ gc_percent_escape (dirmngr_socket_name ()));
+ {
+ char *infostr = getenv ("GPG_AGENT_INFO");
+
+ if (!infostr || !*infostr)
+ infostr = make_filename (default_homedir (), "S.gpg-agent", NULL);
+ else
+ {
+ char *tmp;
+
+ infostr = xstrdup (infostr);
+ tmp = strchr (infostr, PATHSEP_C);
+ if (!tmp || tmp == infostr)
+ {
+ xfree (infostr);
+ infostr = NULL;
+ }
+ else
+ *tmp = 0;
+ }
+ fprintf (outfp, "agent-socket:%s\n",
+ infostr? gc_percent_escape (infostr) : "");
+ xfree (infostr);
+ }
+ {
+ /* We need to use make_filename to expand a possible "~/". */
+ char *tmp = make_filename (default_homedir (), NULL);
+ fprintf (outfp, "homedir:%s\n", gc_percent_escape (tmp));
+ xfree (tmp);
+ }
break;
}
More information about the Gnupg-commits
mailing list