Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123870 - GSview barfs at Ghostscripts with three-part version numbers
Summary: GSview barfs at Ghostscripts with three-part version numbers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 15:51 UTC by Marek Szuba
Modified: 2006-08-26 19:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cdll.c-theeepartverno.diff (cdll.c-theeepartverno.diff,514 bytes, patch)
2006-02-23 15:51 UTC, Marek Szuba
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Szuba archtester gentoo-dev 2006-02-23 15:51:09 UTC
Hello everyone,

The API of all three flavours of Ghostscript presents the version number as an integer concatenating parts of the human-readable form of the version - 7.07 is 707, 8.00 is 800 etc. Unfortunately the same is done for releases tagged with three-part version numbers, for instance in case of espgs-8.15.1 the version number returned by the API is 81501, not (as one would expect for consistency) 815.01, even though the latter form is displayed by the same app when it is run. Consequently, programs which perform version check on Ghostscript by comparing the int the latter returns to some other values and use this method to check if the version is not newer thaan... will refuse to work. One of such programs is GSview.

Enclosed you will find a patch which works around the issue by repeatedly dividing the version number by ten if it's larger than 999. While this is something of a hack, it works fine and, considering the program's current max Ghostscript version number is 9.something, is not likely to break things in the near future.
Comment 1 Marek Szuba archtester gentoo-dev 2006-02-23 15:51:54 UTC
Created attachment 80567 [details, diff]
cdll.c-theeepartverno.diff
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2006-04-02 15:11:42 UTC
thanks, fixed
Comment 3 Stefan Tittel 2006-08-26 19:15:14 UTC
This bug still happens with gsview-4.6 on AMD64, where 4.6 is the current stable version.