gpo.zugaina.org

Search Portage & Overlays:

app-eselect/eselect-nodejs

Node.js eselect module

Screenshots

  • eselect-nodejs-1
    ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86

    View      Download      Browse     License: GPL-2   
    Overlay: bentoo

ChangeLog

commit 7c8a92be307150de4158bc05fa5a44416d511479
Author: lucascouts <lucascs@protonmail.com>
Date: Sun Aug 2 01:08:32 2026 -0300

add(app-eselect/eselect-nodejs-1)

eselect module that owns every unversioned Node.js path, so that
net-libs/nodejs can be slotted by major version.

Slots are discovered from the filesystem (glob over /usr/lib*/node-[0-9]*,
gated on an executable bin/node), never from a version list in code, and
ordered with sort -V -u: lexicographically node10 precedes node9, and -u
collapses the duplicate a lib -> lib64 profile symlink would produce.

A real directory at /usr/include/node is removed explicitly before the
link is created. Verified on GNU coreutils 9.11 that neither ln -sf nor
ln -sfn replaces one -- both descend into it and create node/node, after
which node-gyp resolves the wrong headers with no message. ln -sfn is
still used everywhere, for the other case: re-pointing over a symlink to
a directory would otherwise be written inside the previously active slot.

/etc/npm and /etc/env.d/50npm move here from net-libs/nodejs: neither is
slot-specific, so two installed slots would own the same file and
FEATURES="protect-owned" would turn that into a merge failure. The strong
blocker against net-libs/nodejs:0 is what keeps the already-merged
unslotted package from colliding on that same file during migration.

scripts/test-eselect-nodejs.sh drives the module through the real eselect
binary against a fabricated root: 15 assertions, hermetic, no sudo and no
merge needed. It neutralises eselect's env update, which regenerates the
host's /etc/profile.env regardless of --root.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>