Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76339 - gensync(0.1.0) from app-portage/gentoolkit-dev-0.2.0_pre4 fails to parse config file
Summary: gensync(0.1.0) from app-portage/gentoolkit-dev-0.2.0_pre4 fails to parse conf...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
Depends on:
Reported: 2005-01-01 12:50 UTC by Drake Wyrm
Modified: 2010-03-27 23:02 UTC (History)
0 users

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

patch to fix gensync (patch.diff,542 bytes, patch)
2005-01-01 12:51 UTC, Drake Wyrm
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Drake Wyrm 2005-01-01 12:50:15 UTC
The function ConfigDefaults._init_from_file in gensync(0.1.0) from app-portage/gentoolkit-dev-0.2.0_pre4 fails to properly parse "/etc/gensync/gensync.conf". Given the syntax of "gensync.conf", there would be three space-separated values in a well-formed line. The _init_from_file function parses for two values.

The attached patch, while sloppy, allows gensync to parse it's config file with the given syntax. An alternative approach would be to remove the spaces from beside the "=" character in the config file and change line 40 of gensync to read

	(attrib, value) = x.split("=")

All things considered, that would be a lot cleaner.
Comment 1 Drake Wyrm 2005-01-01 12:51:35 UTC
Created attachment 47330 [details, diff]
patch to fix gensync
Comment 2 Emil Beinroth 2005-01-30 12:23:18 UTC
Hm, if I look at my gensync it already does
(attrib, value) = x.split("=")
and strip whitespaces from both sides of attrib and value.

Perhaps you meant app-portage/gentoolkit-dev-0.2.0_pre2 .. in that case look at :)
Comment 3 Drake Wyrm 2005-01-30 23:28:16 UTC

The x.split("=") you mention is in a different section where it's parsing a different file.

I meant _pre4. That's the one I installed when I wanted to try gensync. Sure wish somebody hadn't marked #44777 fixed. I might have been able to find that bug instead of filing this one.
Comment 4 Emil Beinroth 2005-01-31 15:19:23 UTC
Hm, funny thing:
appro ~ # wget ""
           => `attachment.cgi?id=47330&action=view'
00:14:26 (5.17 MB/s) - `attachment.cgi?id=47330&action=view' saved [542/542]

appro ~ # patch --dry-run -p0 -d /usr/bin/ < \
patching file gensync
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file gensync.rej
appro ~ # 

and if I compare your patch with the patch from the other bug , I can clearly see that this already has been fixed.
Perhaps your should emerge -va gentoolkit-dev and look at the version .. then try to patch pre4 with your diff.
Comment 5 Drake Wyrm 2005-02-01 01:08:58 UTC
Hmmm.... I must be on crack or something. I swear I had _pre4 installed this morning when I wrote comment #3, but this evening I only had _pre3 installed. Upon upgrading, it seems the problem is indeed fixed in _pre4. I apologize to all for the noise, and thank you Emil for pointing out my confusion.