libopkg: remove GPG support
[oweals/opkg-lede.git] / libopkg / opkg_cmd.c
index 8fc846ad57aeab890c2c927fc0471fbcd42e1e63..427b356f0257cc8b76b05f13eebf4d4c7be7f681 100644 (file)
@@ -15,8 +15,6 @@
    General Public License for more details.
 */
 
-#include "config.h"
-
 #include <stdio.h>
 #include <dirent.h>
 #include <glob.h>
@@ -144,7 +142,7 @@ static int opkg_update_cmd(int argc, char **argv)
                                 list_file_name);
                }
                free(url);
-#if defined(HAVE_GPGME) || defined(HAVE_OPENSSL) || defined(HAVE_USIGN)
+#if defined(HAVE_OPENSSL) || defined(HAVE_USIGN)
                if (pkglist_dl_error == 0 && conf->check_signature) {
                        /* download detached signitures to verify the package lists */
                        /* get the url for the sig file */
@@ -435,14 +433,6 @@ static int opkg_install_cmd(int argc, char **argv)
        char *arg;
        int err = 0;
 
-       if (conf->force_reinstall) {
-               int saved_force_depends = conf->force_depends;
-               conf->force_depends = 1;
-               (void)opkg_remove_cmd(argc, argv);
-               conf->force_depends = saved_force_depends;
-               conf->force_reinstall = 0;
-       }
-
        signal(SIGINT, sigint_handler);
 
        /*
@@ -455,6 +445,18 @@ static int opkg_install_cmd(int argc, char **argv)
                if (opkg_prepare_url_for_install(arg, &argv[i]))
                        return -1;
        }
+
+       pkg_hash_load_package_details();
+       pkg_hash_load_status_files();
+
+       if (conf->force_reinstall) {
+               int saved_force_depends = conf->force_depends;
+               conf->force_depends = 1;
+               (void)opkg_remove_cmd(argc, argv);
+               conf->force_depends = saved_force_depends;
+               conf->force_reinstall = 0;
+       }
+
        pkg_info_preinstall_check();
 
        for (i = 0; i < argc; i++) {