Skip to content
Permalink
Browse files

Fix implementation and use of the alternative package name

 lookup

Any real_name'' which was found was not getting used before.

Also, when the lookup is unsuccessful, this means there is no
/alternative/ package name.  Thus we should use the hard-coded package
name as the real_name for our PackageKit installation request.

[bug #603757]
origin commit: https://gitlab.gnome.org/GNOME/file-roller/commit/95aafc3c
  • Loading branch information...
Iain Nicol authored and sc0w committed May 22, 2011
1 parent fa96f93 commit b1d6ced0335ed29c2305bb517228dff8cb8b8411
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/dlg-package-installer.c
@@ -139,10 +139,12 @@ get_packages_real_names (char **names)
real_name = g_key_file_get_string (key_file, "Package Matches", names[i], NULL);
if (real_name != NULL)
real_name = g_strstrip (real_name);
if ((real_name == NULL) || (strncmp (real_name, "", 1) == 0))
real_names[i] = g_strdup (real_name);

g_free (real_name);
if ((real_name == NULL) || (strncmp (real_name, "", 1) == 0)) {
g_free (real_name);
real_name = g_strdup (names[i]);
}
real_names[i] = real_name;
real_name = NULL;
}

g_free (filename);
@@ -200,7 +202,7 @@ install_packages (InstallerData *idata)
"InstallPackageNames",
g_variant_new ("(u^ass)",
xid,
names,
real_names,
"hide-confirm-search,hide-finished,hide-warning"),
G_DBUS_CALL_FLAGS_NONE,
G_MAXINT,

0 comments on commit b1d6ced

Please sign in to comment.
You can’t perform that action at this time.