Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278343 - [patch] app-admin/conky-1.7.1.1 doesn't like # in TEXT at all
Summary: [patch] app-admin/conky-1.7.1.1 doesn't like # in TEXT at all
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Pielmeier
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-19 19:05 UTC by Alex Alexander (RETIRED)
Modified: 2009-07-19 20:34 UTC (History)
1 user (show)

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


Attachments
patch that fixes # behavior (conky-1.7.1.1-comment.patch,826 bytes, patch)
2009-07-19 19:05 UTC, Alex Alexander (RETIRED)
Details | Diff
new patch from upstream that fixes # problems (conky-1.7.1.1-comment.patch,1.53 KB, patch)
2009-07-19 19:32 UTC, Alex Alexander (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Alexander (RETIRED) gentoo-dev 2009-07-19 19:05:22 UTC
with 1.7.1.1, # is treated as a comment in TEXT.

this is a problem because in my output I need to use # for color values. unfortunately, although conky's ChangeLog specifies you can escape the # sign (\#) to actually use it, this doesn't work.

I've written a patch that allows # usage in TEXT if its prefixed with an \.
It seems to work fine here:
# => Comment until end of line
\# => \ is stripped and # is printed on screen.

I've submitted the patch to Upstream's bug tracker (URL).

ebuild and patch are available in my overlay, wirelay:
http://github.com/wired/wirelay/tree/master/app-admin/conky

I'll attach the patch here as well.
Comment 1 Alex Alexander (RETIRED) gentoo-dev 2009-07-19 19:05:54 UTC
Created attachment 198496 [details, diff]
patch that fixes # behavior
Comment 2 Brenden Matthews 2009-07-19 19:15:37 UTC
This has actually been fixed in git for a while.  Thanks for the patch though.  See:

http://git.omp.am/?p=conky.git;a=commit;h=aaca08fc972fb37f15e0b4e21de2b67c094021ed
http://git.omp.am/?p=conky.git;a=commit;h=e2caa5892301f5e04bb7326106c20d187260fa6e
Comment 3 Brenden Matthews 2009-07-19 19:16:49 UTC
Oh wait, looks like I didn't read the first comment.  I'll go cower in shame now.
Comment 4 Alex Alexander (RETIRED) gentoo-dev 2009-07-19 19:32:28 UTC
Created attachment 198497 [details, diff]
new patch from upstream that fixes # problems

meh :) OK, I recreated the patch from those two commits :)
Comment 5 Alex Alexander (RETIRED) gentoo-dev 2009-07-19 20:19:25 UTC
(In reply to comment #2)
> This has actually been fixed in git for a while.  Thanks for the patch though. 
> See:
> 
> http://git.omp.am/?p=conky.git;a=commit;h=aaca08fc972fb37f15e0b4e21de2b67c094021ed
> http://git.omp.am/?p=conky.git;a=commit;h=e2caa5892301f5e04bb7326106c20d187260fa6e
> 

I've been testing the new patch and it seems that the stuff from the second commit above is not working well.

If you have a line with a comment anywhere, it removes the newline from the end of the commented line (together with the comment), effectively concatenating whats left of the line containing the comment with the next one.

The first commit works OK and fixes my \# issue.
Comment 6 Brenden Matthews 2009-07-19 20:23:37 UTC
(In reply to comment #5)
> 
> I've been testing the new patch and it seems that the stuff from the second
> commit above is not working well.
> 
> If you have a line with a comment anywhere, it removes the newline from the end
> of the commented line (together with the comment), effectively concatenating
> whats left of the line containing the comment with the next one.
> 
> The first commit works OK and fixes my \# issue.
> 

I'm guessing the second patch relies on some previous patch.  I'm too lazy to dig through the code and see what's missing.
Comment 7 Alex Alexander (RETIRED) gentoo-dev 2009-07-19 20:25:19 UTC
(In reply to comment #6)
> I'm guessing the second patch relies on some previous patch.  I'm too lazy to
> dig through the code and see what's missing.

Alright. I'll just add the first patch then to allow \#s to work for now :)

Comment 8 Alex Alexander (RETIRED) gentoo-dev 2009-07-19 20:34:37 UTC
I've added the patch to CVS. Thanks.