install-info can fail to install due to syntax errors in /etc/environment
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | texinfo (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
The package install-info sources /etc/environment and will fail to install if there are any configuration errors in that file. This seems to happen a fair bit.
As an example see bug 984562 or the invalid bug reports about texinfo:
| Changed in texinfo (Ubuntu): | |
| assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
| tags: | added: bugpattern-written |
| Paul (paul-wozney) wrote : | #2 |
It looks like /etc/environment is trying to call export, but it is case sensitive.
So I modified /etc/environment from this:
$ cat /etc/environment
PATH="/
EXPORT GNOME_SHELL_
To this:
$ cat /etc/environment
PATH="/
EXPORT GNOME_SHELL_
And it works.
| Paul (paul-wozney) wrote : | #3 |
Ahh oops. I meant I changed it to this:
$ cat /etc/environment
PATH="/
export GNOME_SHELL_
| Steve Langasek (vorlon) wrote : | #4 |
You should not have the 'export' word in /etc/environment at all. *all* variables in /etc/environment are exported; the parser simply ignores this for compatibility.
My mistake in the /etc/environment file that probably provoked this error was that I had a line:
# Setup JDK
JAVA_HOME=
Instead of:
# Setup JDK
JAVA_HOME=
Note the missing terminating '"'
| Changed in texinfo (Ubuntu): | |
| assignee: | Canonical Foundations Team (canonical-foundations) → nobody |
| Norbert Preining (preining) wrote : Re: [Bug 993407] Re: install-info can fail to install due to syntax errors in /etc/environment | #6 |
On Do, 10 Okt 2013, Brian Murray wrote:
> The package install-info sources /etc/environment and will fail to
> install if there are any configuration errors in that file. This
> seems to happen a fair bit.
Yes, and if we ad
rm -rf /
into /etc/profile then we can also get bugs ...
I don't care for bugs that are misconfiguration of users. We cannot
protect users from shooting themselves ...
Norbert
-------
PREINING, Norbert http://
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------
| getman (getmanartem) wrote : | #7 |
I found usefull advice about changing 'EXPORT' to 'export'. Additional rised the follow error:
/etc/environment: string 13: PGDATA: command not found
because I have set up PostgreSQL db. The reason is comically - extra spaces on the follow string
PGDATA = "/var/lib/
PGDATA=
| Norbert Preining (preining) wrote : | #8 |
On Do, 24 Okt 2013, getman wrote:
> I found usefull advice about changing 'EXPORT' to 'export'. Additional rised the follow error:
> /etc/environment: string 13: PGDATA: command not found
> because I have set up PostgreSQL db. The reason is comically - extra spaces on the follow string
> PGDATA = "/var/lib/
> PGDATA=
Guys, if you are not able to write correct shell code, and put it
into one of the central configuration files, then I am sorry for you,
but I will not change anything.
I cannot prevent you from shooting yourself in the knee.
Can someone please close this bug ...
Enjoy
Norbert
-------
PREINING, Norbert http://
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------
Fair enough if there is a proper error message in some log that describes that it's because of an error in a given configuration file that is the cause of the failure to update.
| J Richard Snape (snapey) wrote : | #10 |
Same as @getman above - had spaces in my definition of JAVA_HOME. Norbert raises a fair point about the file being incorrect, rather thanthis being a genuine bug. The error message did point to a problem with the JAVA_HOME variable, but not the specific error in the /etc/environment file. As mike-kristoffersen says a more informative error message would be helpful.
I had added the following lines to my /etc/environment
LC_COLLATE=C
VISUAL=
EDITOR=
first_weekday 2
I removed the lines and the error went away. I was recently working on some changes and forgot to remove these changes after testing. I have these lines in my user configuration files now.


Status changed to 'Confirmed' because the bug affects multiple users.