Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68397 - Quotes in /etc/etc-update.conf not parsed correctly by portage 2.0.51
Summary: Quotes in /etc/etc-update.conf not parsed correctly by portage 2.0.51
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-21 07:18 UTC by Diederik van der Boor
Modified: 2006-05-25 11:25 UTC (History)
0 users

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


Attachments
It's your configuration slighty modified at the top, with commands now in quotes. (etc-update.conf,790 bytes, text/plain)
2005-01-06 20:45 UTC, Alec Warner (RETIRED)
Details
My etc-update.conf file (with bad quotes that cause the error) (etc-update.conf,1.03 KB, text/plain)
2005-01-07 02:18 UTC, Diederik van der Boor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diederik van der Boor 2004-10-21 07:18:59 UTC
Af of portage-2.0.51, quotes in /etc/etc-update.conf are not handled correctly.

Using mode="0" in the config file results in the following error:
/usr/sbin/etc-update: line 373: declare: "0"           : syntax error: operand expected (error token is ""0"           ")

Similar things happen with using mv_opts="-i":
Please select from the menu above (-1 to ignore this update): 2
Deleting /etc/fonts/._cfg0000_local.conf
rm: cannot remove `"-i"': No such file or directory


Reproducible: Always
Steps to Reproduce:
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2004-10-21 07:56:42 UTC
Post your config file.
Comment 2 Diederik van der Boor 2004-11-19 02:16:03 UTC
The problem is quite simple, each variable I try to enclose with quotation marks produces an error. In this case, I've added quotes arround the 'mode' variable, but it could have been any other variable as well:


This is my config file:

###### Settings for etc-update; a tool to update the /etc/ files


## == Options
mode="0"           # 0 = text, 1 = menu
eu_automerge=yes # Whether trivial/comment changes should be automerged

## == Commands
rm_opts=-i  # arguments for "rm"
mv_opts=-i  # arguments for "mv"
cp_opts=-i  # arguments for "cp"

## == Tools
diff_command=vim -d %file1 %file2             # diff: vimdiff (default="diff -uN %file1 %file2")
using_editor=1                                # ???
pager=""      # pager for $diff_command, see NOTE_2 (default="less")
merge_command=sdiff -s -o %merged %orig %new  # merge, see NOTE_1


# NOTE_1: Editors such as vim/vimdiff are not usable for the merge_command
#         because it is not known what filenames the produced files have
#         (the user can choose while using those programs)
# NOTE_2: Make sure pager is set to "" when using an editor as diff_command!
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-01-06 20:36:33 UTC
Copying that to a file on my system gives the same result, so it's definately something in that file, let me play with it a bit.
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-01-06 20:43:46 UTC
Deleting the whitespace and comments above mode="0" appeared to fix it, you probably had some odd character in there or something, I'm unsure.  However, after deleting those 4 lines of spaces and comments it went through without a hitch, try this new file to see if it works.
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-01-06 20:45:23 UTC
Created attachment 47804 [details]
It's your configuration slighty modified at the top, with commands now in quotes.

I'm still unsure exactly what character was in your file, but some kind of
control character was, I'm unskilled at that sort of thing at this time, but it
didn't show up in the file diff's either *shrugs*.  It's not an etc-update
error though.
Comment 6 Diederik van der Boor 2005-01-07 02:18:21 UTC
Created attachment 47822 [details]
My etc-update.conf file (with bad quotes that cause the error)

> I'm still unsure exactly what character was in your file,
> but some kind of control character was, I'm unskilled at
> that sort of thing at this time, but it didn't show up in
> the file diff's either *shrugs*.
> It's not an etc-update error though.	

Strange...

I've attached my complete config file this time, that file still produces an
error at my system.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-05-25 11:25:02 UTC
Not reproducable, closing a stale bug.