Bug 43305

Summary: [glib] unexpected catalogue parsing
Product: PackageKit Reporter: Christian Persch (GNOME) <chpe>
Component: client-libraryAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: proposed patch

Description Christian Persch (GNOME) 2011-11-28 06:45:08 UTC
The catalogue entries look like string lists, but are parsed with g_key_file_get_string() and only afterwards split along into parts. String lists end with a ';' character, which the current code will make into an empty string, which later leads to an error when the packagekit backend tries to install that "" package. Since it's surprising to the user that these entries are parsed as strings not string lists, the lib should tolerate the string list format and thus skip the empty string parts.

Alternatively, just use g_key_file_get_string_list(); is there any reason that ',' and ' ' are also supported as delimiters?
Comment 1 Christian Persch (GNOME) 2011-11-28 06:46:49 UTC
Created attachment 53902 [details] [review]
proposed patch
Comment 2 Richard Hughes 2011-11-28 08:17:54 UTC
Pushed with minor changes, many thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.