summaryrefslogtreecommitdiff
path: root/src/dlg-package-installer.c
diff options
context:
space:
mode:
authorIain Nicol <[email protected]>2011-05-22 11:42:03 +0100
committerZenWalker <[email protected]>2018-11-28 00:39:34 +0100
commitb1d6ced0335ed29c2305bb517228dff8cb8b8411 (patch)
treeb5eef7cf609adfe1337f96164c1e1818506db8e3 /src/dlg-package-installer.c
parentfa96f93fbc43516a53a3efac4a52ae7745e61cdc (diff)
downloadengrampa-b1d6ced0335ed29c2305bb517228dff8cb8b8411.tar.bz2
engrampa-b1d6ced0335ed29c2305bb517228dff8cb8b8411.tar.xz
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
Diffstat (limited to 'src/dlg-package-installer.c')
-rw-r--r--src/dlg-package-installer.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/dlg-package-installer.c b/src/dlg-package-installer.c
index ac6ff87..5543cda 100644
--- a/src/dlg-package-installer.c
+++ b/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,