After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732242 - Usage information provided in --help is invalid.
Usage information provided in --help is invalid.
Status: RESOLVED FIXED
Product: gnome-logs
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-logs maintainer(s)
gnome-logs maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-06-25 18:01 UTC by Aaron Hamilton
Modified: 2014-06-25 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch which fixes the issue on master as of 963a1871f40760ebbb842e1740320045ab7c6e00. (428 bytes, patch)
2014-06-25 18:01 UTC, Aaron Hamilton
needs-work Details | Review
Patch adjusted to embody David King's suggestions. (466 bytes, patch)
2014-06-25 19:10 UTC, Aaron Hamilton
committed Details | Review

Description Aaron Hamilton 2014-06-25 18:01:39 UTC
Created attachment 279243 [details] [review]
Patch which fixes the issue on master as of 963a1871f40760ebbb842e1740320045ab7c6e00.

g_set_prgname() is being called with PACKAGE_NAME. so the usage section in --help is saying it can be executed with "Logs [OPTION...]".

One solution is to remove the call altogether, and let gdk_init() handle setting prgname (which it does correctly).

The patch provided here compiles correctly, and causes no obvious bugs. Furthermore, there are no explicit calls to g_get_prgname, so I suspect there are no unusual consumers which require it to be set to PACKAGE_NAME (which is "Logs") lurking anywhere inside gnome-logs itself.
Comment 1 Aaron Hamilton 2014-06-25 18:05:14 UTC
This bug also applies to 3.12.2 stable.
Comment 2 David King 2014-06-25 18:12:29 UTC
Comment on attachment 279243 [details] [review]
Patch which fixes the issue on master as of 963a1871f40760ebbb842e1740320045ab7c6e00.

The argument to g_set_prgname() should not be translated, according to the documentation for that function, so the call can be made correct if you replace the argument with PACKAGE_TARNAME.
Comment 3 Aaron Hamilton 2014-06-25 19:10:31 UTC
Created attachment 279248 [details] [review]
Patch adjusted to embody David King's suggestions.

This meets your suggestion, although I still don't think it's necessary to call it at all.
Comment 4 David King 2014-06-25 20:10:48 UTC
Comment on attachment 279248 [details] [review]
Patch adjusted to embody David King's suggestions.

Thanks for the patch, I pushed it to master as commit 121ca2690522b0ef3c087d84157fbd315aae4ac7.