Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925863 - =sys-apps/portage-3.0.63 AssertionError LC_ALL=... for posixish locale. It seems that split_LC_ALL was not called for phase config?
Summary: =sys-apps/portage-3.0.63 AssertionError LC_ALL=... for posixish locale. It se...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 925481
Blocks:
  Show dependency tree
 
Reported: 2024-02-29 15:37 UTC by Olivier Huber
Modified: 2024-04-28 00:32 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Huber 2024-02-29 15:37:14 UTC
$ emerge --config sys-kernel/gentoo-kernel-bin -va

Please select a package to configure:
[ snip ]

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/emerge", line 57, in main
    retval = emerge_main()
             ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_emerge/main.py", line 1308, in emerge_main
    return run_action(emerge_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_emerge/actions.py", line 3876, in run_action
    return action_config(
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/_emerge/actions.py", line 758, in action_config
    retval = portage.doebuild(
             ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/package/ebuild/doebuild.py", line 1218, in doebuild
    rval = _prepare_env_file(mysettings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/package/ebuild/doebuild.py", line 1686, in _prepare_env_file
    env_extractor.start()
  File "/usr/lib/python3.12/site-packages/_emerge/AsynchronousTask.py", line 34, in start
    self._start()
  File "/usr/lib/python3.12/site-packages/_emerge/BinpkgEnvExtractor.py", line 43, in _start
    env=self.settings.environ(),
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/package/ebuild/config.py", line 3378, in environ
    raise AssertionError(
AssertionError: LC_ALL=en_US.UTF-8 for posixish locale. It seems that split_LC_ALL was not called for phase config?


Unsetting LC_ALL is the proper fix and was already mentioned in #565326
The current error message is more intended for developers rather than users.
Others are also wondering about that failure: https://forums.gentoo.org/viewtopic-p-8817477.html?sid=ab58d43f8ea910db31e54c8414ea7b0f


$ emerge --info sys-apps/portage
Portage 3.0.63 (python 3.12.2-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.39-r1, 6.7.4-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.7.4-gentoo-dist-x86_64-AMD_Ryzen_7_5825U_with_Radeon_Graphics-with-glibc2.39
KiB Mem:    39859388 total,   2486768 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 29 Feb 2024 14:00:00 +0000
Head commit of repository gentoo: d6bd754abcbed61695887401742a45d4d3d90add
Timestamp of repository guru: Thu, 29 Feb 2024 14:03:18 +0000
Head commit of repository guru: e6099527665da2580178b1257e486607da3e6ad4

Head commit of repository kdab-overlay: 41c0a6e87ca591cb11445ae471e7604dd95e388e

Timestamp of repository steam-overlay: Fri, 16 Feb 2024 23:18:24 +0000
Head commit of repository steam-overlay: 214f4d5b11850f9751ee0939df3dd2aaaaef6d26

sh bash 5.2_p26
ld GNU ld (Gentoo 2.41 p5) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.3::gentoo
dev-build/libtool:         2.4.7-r2::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.2::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.11.8_p1::gentoo, 3.12.2_p1::gentoo
dev-lang/rust-bin:         1.75.0::gentoo
sys-apps/baselayout:       2.14-r2::gentoo
sys-apps/openrc:           0.53::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.41-r5::gentoo, 2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers:  6.7::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

kdab-overlay
    location: /var/db/repos/kdab-overlay
    sync-type: git
    sync-uri: https://github.com/KDAB/kdab-overlay.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

xhub-repo
    location: /var/db/repos/xhub-repo
    masters: gentoo
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/dev/shm"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities adns alsa amd64 audit avif bcrypt berkdb blake2 bluetooth bluray boost branding brightness-control brotli bzip2 cacert cairo caps cdda cdr chm cli colord cplugins crypt cscope cups curl dbus declarative dia djvu dri dts dvd dvdr ed25519 egl eglfs elf elogind encode eps epub eselect-ldso evdev exif ffmpeg fftw fits flac fontconfig fontforge fortran gcrypt gdbm gif gles gles2 gmp gold gpm graphviz gsl gtk gui heif highlight http2 iconv icu idn imagemagick ipv6 jack jpeg jpeg2k json kde kms kwallet ladspa lapack lapacke latex lcms libbsd libnotify libsamplerate libtirpc lm-sensors lua lv2 lz4 lzma mad markdown metis mms mng mobi mp3 mp4 mpeg mtp multilib ncurses networkmanager nls octave ogg openexr opengl openmp pam pango pcre pdf perl pipewire plasma plugins pm-utils png policykit postscript ppds pthread pulseaudio python qml qt5 quiche raw readline rtmp sasl screencast sctp sdl seccomp semantic-desktop sound sparse speex spell split-usr sqlite ssh ssl startup-notification svg svt-av1 szip terminal test-rust theora threads thunderbolt tiff tools touchpad truetype udev udisks unicode upower usb utils v4l vaapi vdpau vim-syntax vorbis vulkan wayland webp widgets x264 xar xattr xcb xft xml xpm xv xvid xxhash yaml z3 zimg zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en fr" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="BPF X86 WebAssembly" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="lua5-1 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11 python3_12" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu radeonsi radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sys-apps/portage-3.0.63::gentoo was built with the following:
USE="gentoo-dev (ipc) native-extensions rsync-verify xattr -apidoc -build -doc (-selinux) -test" ABI_X86="(64)" PYTHON_TARGETS="python3_11 python3_12 -pypy3 -python3_10"
FEATURES="unmerge-logs binpkg-multi-instance buildpkg-live preserve-libs qa-unresolved-soname-deps distlocks network-sandbox unknown-features-warn userfetch parallel-fetch usersync sandbox userpriv assume-digests ipc-sandbox binpkg-docompress fixlafiles protect-owned xattr pkgdir-index-trusted multilib-strict warn-on-large-env pid-sandbox merge-sync binpkg-dostrip binpkg-logs unmerge-orphans config-protect-if-modified usersandbox ebuild-locks strict news strict-keepdir sfperms merge-wait"
Comment 1 Larry the Git Cow gentoo-dev 2024-03-02 04:09:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=fe510e099bc9a8055c3ee50fced47fc3dc7ba166

commit fe510e099bc9a8055c3ee50fced47fc3dc7ba166
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-03-01 17:09:56 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-03-01 18:08:51 +0000

    doebuild: Call _setup_locale
    
    Call _setup_locale in order to prevent an AssertionError from
    config.environ() for the config phase (or any other phase for
    that matter).
    
    For returnproc or returnpid assume that the event loop is running
    so we can't run the event loop to call _setup_locale in this case
    and we have to assume the caller took care of it (otherwise
    config.environ() will raise AssertionError).
    
    Update DoebuildFdPipesTestCase to use EAPI 8 and test the
    pkg_config function with an ebuild located in /var/db/pkg just
    like emerge --config does. Set LC_ALL=C just before doebuild
    calls in order to try and trigger the config.environ()
    split_LC_ALL assertion.
    
    Bug: https://bugs.gentoo.org/925863
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/package/ebuild/doebuild.py             |  8 +++
 lib/portage/tests/ebuild/test_doebuild_fd_pipes.py | 77 ++++++++++++----------
 2 files changed, 52 insertions(+), 33 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2024-04-28 00:32:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e53b9368c215451e3af78b557d8b86a2db9677

commit f1e53b9368c215451e3af78b557d8b86a2db9677
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-28 00:31:29 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-28 00:31:29 +0000

    sys-apps/portage: add 3.0.64
    
    Closes: https://bugs.gentoo.org/925481
    Closes: https://bugs.gentoo.org/675748
    Closes: https://bugs.gentoo.org/712222
    Closes: https://bugs.gentoo.org/920330
    Closes: https://bugs.gentoo.org/925213
    Closes: https://bugs.gentoo.org/925863
    Closes: https://bugs.gentoo.org/925888
    Closes: https://bugs.gentoo.org/925907
    Closes: https://bugs.gentoo.org/926048
    Closes: https://bugs.gentoo.org/926221
    Closes: https://bugs.gentoo.org/927059
    Closes: https://bugs.gentoo.org/927632
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.64.ebuild | 242 +++++++++++++++++++++++++++++++++
 2 files changed, 243 insertions(+)