Bug 25050

Summary: package_ids should be const
Product: PackageKit Reporter: Robert Staudinger <robert.staudinger>
Component: GeneralAssignee: Richard Hughes <richard>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Robert Staudinger 2009-11-12 07:54:31 UTC
The gchar **package_ids parameters should be const.

Affected functions:

pk_client_install_packages
pk_client_update_packages
pk_client_simulate_install_packages
pk_client_simulate_remove_packages
pk_client_simulate_update_packages
pk_client_update_packages_async
pk_client_simulate_install_packages_async
pk_client_simulate_remove_packages_async
pk_client_simulate_update_packages_async
Comment 1 Richard Hughes 2009-11-12 08:40:00 UTC
const gchar **, const gchar * const * or gchar * const *?

Richard.
Comment 2 Robert Staudinger 2009-11-12 08:49:23 UTC
I'd say for conforming with most of the g ecosystem code "const gchar **" would probably be most appropriate (not to say the most correct).

Comment 3 Richard Hughes 2009-11-12 09:40:53 UTC
const gchar ** seems to make the build explode when you pass a gchar** into a const gchar** function. I guess const GStrv would fix things in this regard -- what do you think about that?
Comment 4 Robert Staudinger 2009-11-12 10:13:07 UTC
Oh i didn't realise that.

Maybe it's better to just keep it non-const instead of opening that can of worms.
Comment 5 Richard Hughes 2018-08-21 15:52:22 UTC
We moved the upstream bugtracker to GitHub a long time ago. If this issue still affects you please re-create the issue here: https://github.com/hughsie/PackageKit/issues
 
Sorry for the impersonal message, and fingers crossed your issue no longer happens. 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.