Bug 171848 - gv attempts to open /usr/share/gv/ as a file
gv attempts to open /usr/share/gv/ as a file
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gv (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Orion Poplawski
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-26 19:34 EDT by Michal Jaegermann
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 3.6.1-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-27 16:24:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2005-10-26 19:34:09 EDT
Description of problem:

Looking at a strace of a gv startup one can see there:

open("/usr/share/gv", O_RDONLY)         = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(4, 0x554b40, 4096)                 = -1 EISDIR (Is a directory)
close(4)                                = 0

The context would indicate that really /usr/share/gv/GV is wanted here.
Otherwise we rely on compiled in defaults for various settings.

It would be even nicer if GV.fallbackPageMedia would change to 'A4' or
'Letter' depending on what 'locale -c LC_PAPER' has to say but maybe this
is asking too much. :-)  Not of a vital importance anyway.

Version-Release number of selected component (if applicable):
gv-3.6.1-3.fc5
Comment 1 Orion Poplawski 2005-10-27 16:24:18 EDT
Added patch to open /usr/share/gv/GV.

I'm not opposed to mucking with GV.fallbackPageMedia if you sent a script that
would parse 'local -c LC_PAPER' appropriately.
Comment 2 Michal Jaegermann 2005-10-27 17:12:13 EDT
> I'm not opposed to mucking with GV.fallbackPageMedia if you sent a script ...

  sz=($(locale -c LC_PAPER)); [ "${sz[1]}" = 279 ] && echo Letter || echo A4

or, if you want to avoid arrays,

  sz=$(a="$(locale -c LC_PAPER)"; echo $a | (read b a b ; echo $a))
  [ "$sz" = 279 ] && echo Letter || echo A4

I am not sure if this is worth the bother.  Most documents will have
a bounding box anyway and this will be used.

Note You need to log in before you can comment on or make changes to this bug.