Commit 95aafc3c authored by Iain Nicol's avatar Iain Nicol Committed by Paolo Bacchilega
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]
parent f2242058
......@@ -138,10 +138,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);
......@@ -197,7 +199,7 @@ install_packages (InstallerData *idata)
g_variant_new ("(u^ass)",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment