aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorJason Woodward2007-06-16 06:41:11 +0000
committerJason Woodward2007-06-16 06:41:11 +0000
commit3faba5e19be6cea47ce315e4ee5aca032eea1090 (patch)
tree6febf3e1591b8067bf6913100d67bde979c2b91b /src/main.c
parent549fdf52b1b021c0f608e0a5285461f4e5f6d782 (diff)
downloadslapt-get-3faba5e19be6cea47ce315e4ee5aca032eea1090.tar.gz
* added GPG signature verification via gpgme (thanks Pat Volkerding for
adding gpgme to -current) * Updated downloading in libslapt for better notification. This also resulted in some simplification in code. Removed unused DEBUG ifdefs. Removed deprecated translation strings. Added error condition strings and slapt_strerror() function. New translation strings. Bumped to 0.9.12.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 74e2a17..b1ed35f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -71,6 +71,9 @@ int main( int argc, char *argv[] )
{"retry", 1, 0, SLAPT_RETRY_OPT},
{"no-upgrade", 0, 0, SLAPT_NO_UPGRADE_OPT},
{"install-set", 0, 0, SLAPT_INSTALL_DISK_SET_OPT},
+ #ifdef SLAPT_HAS_GPGME
+ {"add-keys", 0, 0, SLAPT_ADD_KEYS_OPT},
+ #endif
{0, 0, 0, 0},
};
@@ -212,6 +215,11 @@ int main( int argc, char *argv[] )
case SLAPT_INSTALL_DISK_SET_OPT: /* install a disk set */
do_action = INSTALL_DISK_SET;
break;
+ #ifdef SLAPT_HAS_GPGME
+ case SLAPT_ADD_KEYS_OPT: /* retrieve GPG keys for sources */
+ do_action = ADD_KEYS;
+ break;
+ #endif
default:
usage();
slapt_free_rc_config(global_config);
@@ -348,6 +356,11 @@ int main( int argc, char *argv[] )
case AVAILABLE:
slapt_pkg_action_list(AVAILABLE);
break;
+ #ifdef SLAPT_HAS_GPGME
+ case ADD_KEYS:
+ slapt_pkg_action_add_keys(global_config);
+ break;
+ #endif
case USAGE:
default:
printf("main.c(l.%d): This should never be reached\n", __LINE__);
@@ -380,6 +393,9 @@ void usage(void)
printf(" --installed - %s\n",gettext("list installed pkgs"));
printf(" --clean - %s\n",gettext("purge cached pkgs"));
printf(" --autoclean - %s\n",gettext("only purge cache of older, unreacheable pkgs"));
+ #ifdef SLAPT_HAS_GPGME
+ printf(" --add-keys - %s\n",gettext("retrieve GPG keys for sources"));
+ #endif
printf(" --version - %s\n",gettext("print version and license info"));
printf("\n");
printf(gettext("Options:\n"));