Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693366 - env-update: Canonicalize paths in generated files
Summary: env-update: Canonicalize paths in generated files
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-09-02 19:29 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2023-01-04 02:05 UTC (History)
0 users

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


Attachments
Patch (portage-canonicalization.patch,4.50 KB, patch)
2019-09-03 02:09 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.