libopkg: selectively load package feeds in opkg_info_status_cmd()
authorJo-Philipp Wich <jo@mein.io>
Thu, 16 Feb 2017 15:36:58 +0000 (16:36 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 16 Feb 2017 16:02:30 +0000 (17:02 +0100)
Use the new pkg_hash_load_package_details() helper to selectively load the
dependency subgraphs of the to be installed packages.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg/opkg_cmd.c

index 8fc846ad57aeab890c2c927fc0471fbcd42e1e63..f9d519259053dc51d94837026ba6727fc7ac2051 100644 (file)
@@ -435,14 +435,6 @@ static int opkg_install_cmd(int argc, char **argv)
        char *arg;
        int err = 0;
 
        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);
 
        /*
        signal(SIGINT, sigint_handler);
 
        /*
@@ -455,6 +447,18 @@ static int opkg_install_cmd(int argc, char **argv)
                if (opkg_prepare_url_for_install(arg, &argv[i]))
                        return -1;
        }
                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++) {
        pkg_info_preinstall_check();
 
        for (i = 0; i < argc; i++) {