You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: v0.9.4
Last Updated: 2026-02-09
License: This document follows PMS under CC BY-SA 4.0
Status Legend
Status
Description
Full
Fully implemented per PMS specification
Partial
Core functionality works, some edge cases or features missing
Minimal
Basic support only, significant work remaining
Not Yet
Not implemented
N/A
Not applicable to GRPM architecture
Executive Summary
Chapter
Coverage
Notes
Ch. 1: Introduction
N/A
Informational only
Ch. 2: EAPIs
Full
EAPI 0-8 feature matrix complete
Ch. 3: Names and Versions
Full
PMS-compliant version comparison
Ch. 4: Repository Layout
Full
Portage tree structure supported
Ch. 5: Profiles
Partial
Profile loading works, some features missing
Ch. 6: Ebuild File Format
Partial
Parsing via mvdan.cc/sh with hardened workarounds
Ch. 7: Ebuild Variables
Full
All mandatory/optional variables parsed
Ch. 8: Dependencies
Full
All operators, slots, USE deps supported
Ch. 9: Phase Functions
Partial
Core phases work, hardened metadata extraction
Ch. 10: Eclasses
Partial
12 eclass Go modules + 2 via helpers, dynamic loading, BASH_VERSINFO emulation
Ch. 11: Environment
Full
All core variables, CHOST/CBUILD, USE_EXPAND
Ch. 12: Commands
Partial
~160 helper functions, ~55 command map entries
Overall Estimate: ~60% PMS compliance for simple autotools packages, ~51% weighted across all package types. Primary limitation: mvdan.cc/sh Go interpreter handles ~90% of bash correctly, but remaining edge cases cause failures in complex eclasses. See Known Bugs and Fundamental Limitation below.
Chapter 2: EAPIs
Status: Full
GRPM maintains a complete EAPI feature matrix in internal/pkg/eapi.go.
EAPI Support Matrix
EAPI
Status
Key Features
0
Full
Basic ebuild support
1
Full
Slot dependencies, IUSE defaults
2
Full
USE deps, SRC_URI arrows, src_prepare/src_configure
internal/eclass/integration.go # HybridLoader: dynamic eclass loading and caching
internal/ebuild/eclass_bridge.go # Go <-> bash bridging layer
internal/ebuild/eclass_*.go # 12 eclass-specific modules
internal/ebuild/build_*.go # Build system implementations (CMake, Meson)
Chapter 11: Environment
Status: Full
Section 11.1: Environment Variables
Variable
Status
Notes
P, PF, PN, PV, PR, PVR
Full
CATEGORY
Full
A
Full
From Manifest DIST entries
FILESDIR
Full
DISTDIR
Full
WORKDIR
Full
S
Full
v0.9.4: correctly computed from bash env
T
Full
D
Full
ED
Full
EAPI 3+
ROOT
Full
--root flag support
EROOT
Full
EAPI 3+
EPREFIX
Full
EAPI 3+
SYSROOT
Partial
EAPI 7+
ESYSROOT
Partial
EAPI 7+
BROOT
Partial
EAPI 7+
EBUILD_PHASE
Full
EBUILD_PHASE_FUNC
Full
MERGE_TYPE
Full
REPLACING_VERSIONS
Partial
REPLACED_BY_VERSION
Partial
CHOST
Full
v0.9.4: from env, used by econf/tc-arch
CBUILD
Full
v0.9.4: from env, cross-compile detection
Section 11.1.1: USE and USE_EXPAND
Feature
Status
Notes
USE variable
Full
From make.conf + package.use + profile
USE_EXPAND
Full
v0.9.4: passed through from make.conf
IUSE_EFFECTIVE
Partial
Implementation
internal/ebuild/environment.go # Environment setup (20+ Portage variables)
internal/config/config.go # USE flag resolution with variable expansion
Chapter 12: Commands (Helpers)
Status: Partial
Overview
GRPM implements ~160 helper functions in Go across 15 helper files, 12 eclass modules, and 2 build system files. The interpreter's exec handler routes ~55 command map entries, with some entries dispatching to multiple sub-functions (e.g., tc-* family).
Section 12.3: Package Manager Commands
Installation Helpers (36 functions)
Command
Status
Notes
dobin
Full
Resolves paths against $S
doconfd
Full
dodir
Full
dodoc
Full
doenvd
Full
doexe
Full
doheader
Full
dohtml
Full
Deprecated
doinfo
Full
doinitd
Full
doins
Full
Recursive (-r) support
dolib, dolib.a, dolib.so
Full
doman
Full
domo
Full
dosbin
Full
dosym
Full
Including -r (EAPI 8+)
dostrip
Full
EAPI 7+
fowners
Full
fperms
Full
newbin, newsbin, newins, newdoc, newman
Full
Rename-on-install variants
into, insinto, exeinto, docinto
Full
Destination directory setters
insopts, exeopts, diropts
Full
Permission setters
Build Helpers (11 functions)
Command
Status
Notes
econf
Full
ECONF_SOURCE, CHOST, CBUILD, --libdir detection
emake
Full
MAKEOPTS integration
einstall
Full
Deprecated
eautoreconf
Full
AT_M4DIR support
unpack
Full
11 formats including .tar.lz
Patch/Apply Helpers (6 functions)
Command
Status
Notes
eapply
Full
EAPI 6+
eapply_user
Full
EAPI 6+
epatch
Partial
Deprecated, basic support
eshopts_push/pop
Partial
Stack works correctly; shell option changes simulated (Go interpreter limitation)
When the primary bash evaluator fails, GRPM applies defense-in-depth:
mvdan.cc/sh evaluation — Full bash execution with eclass support
Raw SRC_URI extraction — Regex-based fallback from ebuild text (handles SRC_URI= and SRC_URI+=)
Manifest filtering — Safety net: filters signature files from raw manifest entries
This aligns with Portage behavior of never returning unfiltered manifest distfiles.
Implementation
internal/distfile/service.go # Unified distfile resolution (single source of truth)
internal/ebuild/metadata.go # SRC_URI evaluation with eclass support
internal/fetch/mirror.go # Mirror expansion and failover
internal/repo/srcuri_parser.go # SRC_URI parsing with USE filtering
Known Limitations
Bash Interpreter (mvdan.cc/sh)
GRPM uses mvdan.cc/sh instead of system bash. Known issues documented in docs/dev/MVDAN_SH_WORKAROUNDS.md:
Issue
Impact
Workaround
type -P not implemented
libtool.eclass
Preprocess to command -v
declare -f/declare -p
Eclass function checks
Custom Go handlers
${var@a} param attributes
python/guile eclasses
BASH_VERSINFO=(4...) emulation
Brace expansion in var names
findutils, sed test funcs
stripFunctionBodies()
Process substitution >()
multibuild.eclass
Override with simplified version
read -a
linux-headers
No workaround yet
Eclass stdout pollution
sed, toolchain-funcs
>/dev/null redirect
Build Systems
Autotools — Fully supported (econf with ECONF_SOURCE, CHOST, CBUILD)
This document is maintained alongside GRPM development and validated against source code.Corrections welcome via GitHub Issues.Last audit: 2026-02-09 (4-agent code analysis)