Summary: | Have a way to have non-orphan mutable files. | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Sergei Trofimovich (RETIRED) <slyfox> |
Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | eselect, esigra, mgorny, pms |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 174380, 699588 |
Description
Sergei Trofimovich (RETIRED)
2019-11-11 08:36:01 UTC
Just own them in one ebuild, make all GCCs depend on it and add a postrm() to it to clean them up when the last consumer is uninstalled (if desirable). (In reply to Michał Górny from comment #1) > Just own them in one ebuild, make all GCCs depend on it and add a postrm() > to it to clean them up when the last consumer is uninstalled (if desirable). I don't understand what you mean by "own" here. Install them, so they're recorded as owned by that ebuild. I guess you mean something like this? src_install() { use split-usr && dosym /dev/null /lib64/libgcc_s.so.1 } pkg_postinst() { gcc-config "$(gcc-config -c)" } (In reply to Michał Górny from comment #3) > Install them, so they're recorded as owned by that ebuild. I see a few immediate problems: 1. This breaks checksum validation in CONTENTS and tools start complaining about checksum mismatch. On top of that paludis (I think) just left the file on disk as it did not match CONTENTS entry. 2. The semantics of installing a new version is not clear to me. I guess the file gets overwritten and you need to go out of your way (in pkg_preinst()?) to preserve previous instance of a file. Yes, something like this. But use at least preinst to have the valid actually valid. You want hacky stuff, you expect hacky results. `CONFIG_PROTECT` mechanism feels very close to a solution. The main difference from `CONFIG_PROTECT` for this use case would be: - [on package install/update/uninstall] not to leave new file around as a backup when existing file exists and differs from installed. Example file would be a /bin/sh symlink. *** This bug has been marked as a duplicate of bug 371735 *** |