Bug 88 - 2.2.0 fc-cache/fc-list option process on non-Linux
Summary: 2.2.0 fc-cache/fc-list option process on non-Linux
Status: RESOLVED FIXED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: fc-cache (show other bugs)
Version: 2.2
Hardware: All All
: high normal
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-19 16:57 UTC by Tim Mooney
Modified: 2003-05-30 14:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
fix up -s for getopts, don't advertise long options if they're not available (3.20 KB, patch)
2003-05-19 16:58 UTC, Tim Mooney
Details | Splinter Review

Description Tim Mooney 2003-05-19 16:57:35 UTC
fc-cache and fc-list output usage messages that include the GNU-style long
options, even when those options are not available (e.g. all non-Linux platforms).
That's confusing for someone that's trying to figure out how to execute the
programs the cheap way, especially in concert with the issue I reported earlier
about the man pages not getting installed by default because of an automake issue.

Also, fc-cache advertises the `-s' option, but it's not included in the call to
getopt_long or getopt, so it's not accepted on platforms that don't have the
long options.

Patch to not advertise long options if they're not available is attached.  It
also fixes up the call to getopt (and getopt_long) to include s.

If you would like me to tweak the man pages to say something like

  Note: GNU-style long options, e.g. --force, may not be available on all
  platforms.

let me know and I'll include a subsequent patch.

Alternately, you could do as many other packages do and just include the GNU
getopts as an optionally-built part of fontconfig.  It increases the size of the
source package, but there are no other downsides that I can see.
Comment 1 Tim Mooney 2003-05-19 16:58:24 UTC
Created attachment 45 [details] [review]
fix up -s for getopts, don't advertise long options if they're not available
Comment 2 Keith Packard 2003-05-31 07:59:27 UTC
Thanks for the patch.


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.