move pkg_compare_name to pkg_vec and remove qsort in hash_get
[project/opkg-lede.git] / libopkg / opkg_cmd.c
index 2bb93727248a7e208a73f58ff8ede3dde6d87fd5..af6c4b7c7f6861c37f227e5c7a538e971e6ee492 100644 (file)
@@ -756,6 +756,7 @@ static int opkg_list_installed_cmd(opkg_conf_t *conf, int argc, char **argv)
      }
      available = pkg_vec_alloc();
      pkg_hash_fetch_all_installed(&conf->pkg_hash, available);
+     pkg_vec_sort(available, pkg_compare_names);
      for (i=0; i < available->len; i++) {
          pkg = available->pkgs[i];
          /* if we have package name or pattern and pkg does not match, then skip it */