summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-15 19:02:29 +0200
committerDan McGee <dan@archlinux.org>2011-06-15 19:02:29 +0200
commit1cd6515af0ae5d1c3dabd30749a37cfefa7dc4f5 (patch)
tree78ce0656e9200a255537a3c821716e9c90583ac9
parentd21f6ca4aa3209938fa312f29ac03446f57e6a66 (diff)
downloadpacman-1cd6515af0ae5d1c3dabd30749a37cfefa7dc4f5.tar.gz
pacman-1cd6515af0ae5d1c3dabd30749a37cfefa7dc4f5.tar.xz
API: change 'signaturedir' to 'gpgdir'
This is more in line with reality and what we have our makepkg, etc. options named anyway. Original-patch-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/alpm.h8
-rw-r--r--lib/libalpm/handle.c18
-rw-r--r--lib/libalpm/handle.h2
-rw-r--r--lib/libalpm/signing.c2
-rw-r--r--src/pacman/conf.c2
-rw-r--r--src/pacman/pacman.c2
6 files changed, 17 insertions, 17 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 845bd478..bfc01e5c 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -181,10 +181,10 @@ const char *alpm_option_get_logfile(pmhandle_t *handle);
/** Sets the logfile name. */
int alpm_option_set_logfile(pmhandle_t *handle, const char *logfile);
-/** Returns the signature directory path. */
-const char *alpm_option_get_signaturedir(pmhandle_t *handle);
-/** Sets the signature directory path. */
-int alpm_option_set_signaturedir(pmhandle_t *handle, const char *signaturedir);
+/** Returns the path to libalpm's GnuPG home directory. */
+const char *alpm_option_get_gpgdir(pmhandle_t *handle);
+/** Sets the path to libalpm's GnuPG home directory. */
+int alpm_option_set_gpgdir(pmhandle_t *handle, const char *gpgdir);
/** Returns whether to use syslog (0 is FALSE, TRUE otherwise). */
int alpm_option_get_usesyslog(pmhandle_t *handle);
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index d2bb4f61..a516003d 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -77,7 +77,7 @@ void _alpm_handle_free(pmhandle_t *handle)
FREE(handle->logfile);
FREE(handle->lockfile);
FREE(handle->arch);
- FREE(handle->signaturedir);
+ FREE(handle->gpgdir);
FREELIST(handle->dbs_sync);
FREELIST(handle->noupgrade);
FREELIST(handle->noextract);
@@ -140,10 +140,10 @@ const char SYMEXPORT *alpm_option_get_lockfile(pmhandle_t *handle)
return handle->lockfile;
}
-const char SYMEXPORT *alpm_option_get_signaturedir(pmhandle_t *handle)
+const char SYMEXPORT *alpm_option_get_gpgdir(pmhandle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
- return handle->signaturedir;
+ return handle->gpgdir;
}
int SYMEXPORT alpm_option_get_usesyslog(pmhandle_t *handle)
@@ -362,20 +362,20 @@ int SYMEXPORT alpm_option_set_logfile(pmhandle_t *handle, const char *logfile)
return 0;
}
-int SYMEXPORT alpm_option_set_signaturedir(pmhandle_t *handle, const char *signaturedir)
+int SYMEXPORT alpm_option_set_gpgdir(pmhandle_t *handle, const char *gpgdir)
{
CHECK_HANDLE(handle, return -1);
- if(!signaturedir) {
+ if(!gpgdir) {
handle->pm_errno = PM_ERR_WRONG_ARGS;
return -1;
}
- if(handle->signaturedir) {
- FREE(handle->signaturedir);
+ if(handle->gpgdir) {
+ FREE(handle->gpgdir);
}
- handle->signaturedir = strdup(signaturedir);
+ handle->gpgdir = strdup(gpgdir);
- _alpm_log(handle, PM_LOG_DEBUG, "option 'signaturedir' = %s\n", handle->signaturedir);
+ _alpm_log(handle, PM_LOG_DEBUG, "option 'gpgdir' = %s\n", handle->gpgdir);
return 0;
}
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index bace8052..2de6efdd 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -55,7 +55,7 @@ struct __pmhandle_t {
char *dbpath; /* Base path to pacman's DBs */
char *logfile; /* Name of the log file */
char *lockfile; /* Name of the lock file */
- char *signaturedir; /* Directory where GnuPG files are stored */
+ char *gpgdir; /* Directory where GnuPG files are stored */
alpm_list_t *cachedirs; /* Paths to pacman cache directories */
/* package lists */
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index ff97d4c7..9826e425 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -116,7 +116,7 @@ static int init_gpgme(pmhandle_t *handle)
return 0;
}
- sigdir = alpm_option_get_signaturedir(handle);
+ sigdir = alpm_option_get_gpgdir(handle);
if(!sigdir) {
RET_ERR(handle, PM_ERR_SIG_MISSINGDIR, 1);
}
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 82f525c4..081cdd5e 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -467,7 +467,7 @@ static int setup_libalpm(void)
/* Set GnuPG's home directory. This is not relative to rootdir, even if
* rootdir is defined. Reasoning: gpgdir contains configuration data. */
config->gpgdir = config->gpgdir ? config->gpgdir : strdup(GPGDIR);
- ret = alpm_option_set_signaturedir(handle, config->gpgdir);
+ ret = alpm_option_set_gpgdir(handle, config->gpgdir);
if(ret != 0) {
pm_printf(PM_LOG_ERROR, _("problem setting gpgdir '%s' (%s)\n"),
config->gpgdir, alpm_strerror(alpm_errno(config->handle)));
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index afc79f6f..9ed1c612 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -885,7 +885,7 @@ int main(int argc, char *argv[])
printf("\n");
printf("Lock File : %s\n", alpm_option_get_lockfile(config->handle));
printf("Log File : %s\n", alpm_option_get_logfile(config->handle));
- printf("GPG Dir : %s\n", alpm_option_get_signaturedir(config->handle));
+ printf("GPG Dir : %s\n", alpm_option_get_gpgdir(config->handle));
list_display("Targets :", pm_targets);
}