Bug 640366 - xrdb puts space after defined symbols
xrdb puts space after defined symbols
Status: NEW
Product: Fedora
Classification: Fedora
Component: xorg-x11-server-utils (Show other bugs)
22
All Linux
low Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-05 12:33 EDT by Göran Uddeborg
Modified: 2015-05-30 12:09 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Göran Uddeborg 2010-10-05 12:33:21 EDT
Description of problem:
If a symbol is defined on the command line, and used in input to xrdb, a space is inserted after the value.

Version-Release number of selected component (if applicable):
xorg-x11-server-utils-7.4-19.fc14.x86_64

How reproducible:
Every time

Steps to Reproduce:
1.echo 'someXResource: HOME/file' | xrdb -merge -DHOME=/my/home/dir
2.xrdb -q | grep someXResource
  
Actual results:
someXResource:  /my/home/dir /file


Expected results:
someXResource:  /my/home/dir/file
Comment 1 Matěj Cepl 2010-10-06 12:12:26 EDT
Trivially reproducable on F14.
Comment 2 Adam Jackson 2012-05-29 17:20:17 EDT
Not xrdb's fault.  xrdb invokes mcpp for macro expansion:

20685 execve("/usr/bin/mcpp", ["/usr/bin/mcpp", "-P", "-DHOST=atropine", "-DSERVERHOST=atropine", "-DSRVR_atropine", "-DDISPLAY_NUM=0", "-DCLIENTHOST=atropine", "-DCLNT_atropine", "-DVERSION=11", "-DREVISION=0", "-DVENDOR=Fedora Project", "-DVNDR_Fedora_Project", "-DRELEASE=11101000", "-DNUM_SCREENS=1", "-DEXT_SGI_GLX", "-DEXT_GLX", "-DEXT_DAMAGE", "-DEXT_Composite", "-DEXT_XINERAMA", "-DEXT_RANDR", "-DEXT_RENDER", "-DEXT_XFIXES", "-DEXT_XC_MISC", "-DEXT_XKEYBOARD", "-DEXT_SYNC", "-DEXT_BIG_REQUESTS", "-DEXT_XTEST", "-DEXT_XInputExtension", "-DEXT_MIT_SHM", "-DEXT_SHAPE", "-DEXT_Generic_Event_Extension", "-DEXT_DRI2", "-DEXT_RECORD", "-DEXT_DOUBLE_BUFFER", "-DEXT_X_Resource", "-DEXT_XVideo_MotionCompensation", "-DEXT_XVideo", "-DEXT_DPMS", "-DEXT_XFree86_DGA", "-DEXT_XFree86_VidModeExtension", "-DEXT_MIT_SCREEN_SAVER", "-DSCREEN_NUM=0", "-DWIDTH=2560", "-DHEIGHT=1600", "-DX_RESOLUTION=3781", "-DY_RESOLUTION=3783", "-DPLANES=24", "-DBITS_PER_RGB=8", "-DCLASS=TrueColor", "-DCLASS_TrueColor=33", "-DCOLOR", "-DCLASS_TrueColor_24=33", "-DCLASS_DirectColor_24=34", "-DCLASS_TrueColor_32=88", "-DHOME=/my/home/dir"], [...]) = 0

And we just read its output:

20685 write(1, "someXResource:  /my/home/dir /fi"..., 35) = 35
20684 <... read resumed> "someXResource:  /my/home/dir /fi"..., 4096) = 35

So this is mcpp, not xrdb.
Comment 3 Mary Ellen Foster 2012-06-01 08:00:19 EDT
A tiny bit of investigation indicates that adding the parameter "-@kr" to the mcpp call gets rid of the extra space. I don't fully understand what's going on, but for now that would at least be a work-around ...
Comment 4 Mary Ellen Foster 2012-06-01 08:07:56 EDT
Looking at the code, inserting the space actually seems to be intentional in "std" (default) mode:
    "An expanded macro is surrounded by spaces to prevent unintended token merging."

So if you don't want spaces after expanded tokens, you need to use either -@kr or -@old as an argument to mcpp
Comment 5 Adam Jackson 2012-06-04 12:16:49 EDT
That's reasonable enough, although the easy way of implementing it further deepens xrdb's assumption that the preprocessor you're using is a (particular) C preprocessor.

Reassigning back to xrdb.
Comment 6 Fedora End Of Life 2013-01-16 17:17:35 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Göran Uddeborg 2013-01-17 14:53:52 EST
Still present in F18, xorg-x11-server-utils-7.5-14.fc18.x86_64.
Comment 8 Fedora End Of Life 2013-12-21 03:26:25 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 9 Göran Uddeborg 2013-12-22 12:18:44 EST
Still present in F20, xorg-x11-server-utils-7.7-2.fc20.x86_64.
Comment 10 Fedora End Of Life 2015-05-29 04:37:37 EDT
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 11 Göran Uddeborg 2015-05-30 12:09:14 EDT
Still present in F22, xorg-x11-server-utils-7.7-15.fc22.x86_64 (and mcpp-2.7.2-13.fc22.x86_64).

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