opkg: fix the -force_space option
[oweals/opkg-lede.git] / libopkg / opkg_conf.c
index 4d1306e8d49cefc1e7b7b640a4963e607ad73c24..8e9060223b1500a8fa4ddda149671f9ef52276db 100644 (file)
@@ -75,6 +75,10 @@ int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options)
          { "proxy_user", OPKG_OPT_TYPE_STRING, &conf->proxy_user },
          { "query-all", OPKG_OPT_TYPE_BOOL, &conf->query_all },
          { "verbosity", OPKG_OPT_TYPE_BOOL, &conf->verbosity },
+#if defined(HAVE_OPENSSL)
+         { "signature_ca_file", OPKG_OPT_TYPE_STRING, &conf->signature_ca_file },
+         { "signature_ca_path", OPKG_OPT_TYPE_STRING, &conf->signature_ca_path },
+#endif
          { NULL }
      };
 
@@ -260,6 +264,9 @@ int opkg_conf_init(opkg_conf_t *conf, const args_t *args)
      if (args->force_downgrade) {
          conf->force_downgrade = 1;
      }
+     if (args->force_space) {
+         conf->force_space = 1;
+     }
      if (args->force_reinstall) {
          conf->force_reinstall = 1;
      }
@@ -364,6 +371,11 @@ void opkg_conf_deinit(opkg_conf_t *conf)
 
      opkg_conf_free_string(&conf->cache);
 
+#if defined(HAVE_OPENSSL)
+     opkg_conf_free_string(&conf->signature_ca_file);
+     opkg_conf_free_string(&conf->signature_ca_path);
+#endif
+
      if (conf->verbosity > 1) { 
          int i;
          hash_table_t *hashes[] = {
@@ -666,7 +678,7 @@ int opkg_conf_write_status_files(opkg_conf_t *conf)
      pkg_dest_t *dest;
      pkg_vec_t *all;
      pkg_t *pkg;
-     register int i;
+     int i;
      int err;
      FILE * status_file=NULL;