Skip to content

Commit b1d6ced

Browse files
Iain Nicolsc0w
authored andcommitted
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
1 parent fa96f93 commit b1d6ced

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/dlg-package-installer.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ get_packages_real_names (char **names)
139139
real_name = g_key_file_get_string (key_file, "Package Matches", names[i], NULL);
140140
if (real_name != NULL)
141141
real_name = g_strstrip (real_name);
142-
if ((real_name == NULL) || (strncmp (real_name, "", 1) == 0))
143-
real_names[i] = g_strdup (real_name);
144-
145-
g_free (real_name);
142+
if ((real_name == NULL) || (strncmp (real_name, "", 1) == 0)) {
143+
g_free (real_name);
144+
real_name = g_strdup (names[i]);
145+
}
146+
real_names[i] = real_name;
147+
real_name = NULL;
146148
}
147149

148150
g_free (filename);
@@ -200,7 +202,7 @@ install_packages (InstallerData *idata)
200202
"InstallPackageNames",
201203
g_variant_new ("(u^ass)",
202204
xid,
203-
names,
205+
real_names,
204206
"hide-confirm-search,hide-finished,hide-warning"),
205207
G_DBUS_CALL_FLAGS_NONE,
206208
G_MAXINT,

0 commit comments

Comments
 (0)