Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598480 - app-admin/eselect-1.4.5: `# LANG=': not a valid identifier
Summary: app-admin/eselect-1.4.5: `# LANG=': not a valid identifier
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-29 20:27 UTC by Toralf Förster
Modified: 2016-10-30 10:54 UTC (History)
1 user (show)

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


Attachments
Patch for libs/config.bash.in (0001-Ignore-comment-lines-when-parsing-config-files.patch,1.06 KB, patch)
2016-10-30 08:05 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2016-10-29 20:27:59 UTC
The setup of a new tinderbox image spews for a systemd profile an error:


 * Generating locale-archive: forcing # of jobs to 1
 * Generating 5 locales (this might take a while) with 1 jobs
 *  (1/5) Generating de_DE.ISO-8859-1 ...                                 [ ok ]
 *  (2/5) Generating de_DE.UTF-8.UTF-8@euro ...                           [ ok ]
 *  (3/5) Generating de_DE.ISO-8859-15@euro ...                           [ ok ]
 *  (4/5) Generating en_US.ISO-8859-1 ...                                 [ ok ]
 *  (5/5) Generating en_US.UTF-8 ...                                      [ ok ]
 * Generation complete
Setting LANG to en_US.utf8 ...
/usr/share/eselect/libs/config.bash: line 62: local: `# LANG=': not a valid identifier
Run ". /etc/profile" to update the variable in your shell.




non-systemd images are fine
Comment 1 Toralf Förster gentoo-dev 2016-10-29 21:05:35 UTC
I missed to call a env-update after a locale-gen call, but why appeared this issue only for systemd profiles ?
Comment 2 Ulrich Müller gentoo-dev 2016-10-29 22:01:38 UTC
Sorry, but my crystal ball isn't working well at the moment, so I fail to divine what was the exact eselect command that led to your error. :)

So, maybe you could tell me? Also, what version of bash (or emerge --info output)?
Comment 3 Mike Gilbert gentoo-dev 2016-10-29 23:27:33 UTC
% ls -l /etc/env.d/02locale
lrwxrwxrwx 1 root root 14 Sep 15  2013 /etc/env.d/02locale -> ../locale.conf

% cat /etc/locale.conf     
# This file has been created by the sys-apps/systemd ebuild.
# See locale.conf(5) and localectl(1).

# LANG=

% sudo eselect locale set en_US.utf8
Setting LANG to en_US.utf8 ...
/usr/share/eselect/libs/config.bash: line 62: local: `# LANG=': not a valid identifier
Run ". /etc/profile" to update the variable in your shell.
Comment 4 Mike Gilbert gentoo-dev 2016-10-29 23:28:39 UTC
Toralf: For systemd images, it might be better to call localectl set instead of eselect locale.
Comment 5 Mike Gilbert gentoo-dev 2016-10-30 01:58:50 UTC
(In reply to Mike Gilbert from comment #4)

Nevermind on that; localectl makes a dbus call to localed, so that won't work in a chroot.
Comment 6 Ulrich Müller gentoo-dev 2016-10-30 08:05:36 UTC
Created attachment 451903 [details, diff]
Patch for libs/config.bash.in

(In reply to Mike Gilbert from comment #3)
> % ls -l /etc/env.d/02locale
> lrwxrwxrwx 1 root root 14 Sep 15  2013 /etc/env.d/02locale -> ../locale.conf
> 
> % cat /etc/locale.conf     
> # This file has been created by the sys-apps/systemd ebuild.
> # See locale.conf(5) and localectl(1).
> 
> # LANG=

Looks like eselect chokes on the last line. Please try attached patch.
Comment 7 Toralf Förster gentoo-dev 2016-10-30 08:55:40 UTC
(In reply to Ulrich Müller from comment #6)
>Looks like eselect chokes on the last line. Please try attached patch.
gah - EAPI 4 - will try it, but needs time :-(

The emerge is always the one from latest stage3 file.

FWIW the issue happens in line 361 of
https://github.com/toralf/tinderbox/blob/master/bin/tbs.sh
Comment 8 Toralf Förster gentoo-dev 2016-10-30 09:02:26 UTC
patch works !
Comment 9 Ulrich Müller gentoo-dev 2016-10-30 10:54:17 UTC
Fixed in eselect-1.4.7:

commit c24b332b9410df9e67002d13a24a2627d3ff7c8c
Author: Ulrich Müller <ulm@gentoo.org>
Date:   Sun Oct 30 11:51:52 2016 +0100

    app-admin/eselect: Version bump.
    
    Fixes bug 598480.
    
    Package-Manager: portage-2.3.2