Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 693366

Summary: env-update: Canonicalize paths in generated files
Product: Portage Development Reporter: Arfrever Frehtes Taifersar Arahesis <arfrever.fta>
Component: CoreAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=693306
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch

Description Arfrever Frehtes Taifersar Arahesis 2019-09-02 19:29:27 UTC
env-update already filters out raw uncanonicalized duplicates, but it does not detect cases when multiple paths are merged (e.g. /bin + /sbin for PATH in /etc/profile.env, or /lib64 and /usr/lib64 for /etc/ld.so.conf).

I suggest that all or almost all paths be stored in canonicalized form, with duplicates avoided.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-09-03 02:09:25 UTC
Created attachment 588862 [details, diff]
Patch
Comment 2 Zac Medico gentoo-dev 2019-09-03 15:41:48 UTC
Since binary and installed packages have persistent PATH settings in environment.bz2, using realpath on PATH components can break binary and installed package phases if the symlink layout is somehow modified. Therefore, the implications of changes like this need to be considered very carefully.