nagmat84 Guru

Joined: 27 Mar 2007 Posts: 314
|
Posted: Sun Jun 08, 2025 5:53 pm Post subject: Ebuild that removes files from /etc/skel upon unmerge |
|
|
How do I write an ebuild which removes files from /etc/skel upon unmerge?
During merge the ebuild places some files inside /etc/skel. However, the files remain there after the ebuild is has been unmerged as /etc is under CONFIG_PROTECT. Optimally, I expect the following behavior: If the admin has not altered the files at all, i.e. if the files are still the original files from the ebuild, then unmerge removes the files silently. If the admin has changed the files since emerging the ebuild, a message prompts the admin to run etc-update after unmerge and let the admin decide to delete or keep the files.
Background
I am writing an ebuild for Citrix Workspace App for Linux. This application comes with browser plugins for Chrome/Chromium, Edge and Firefox. The original installation script adds configuration files which points to the plug-in to ~/.config/<browser-depending-path> plus /etc/skel (in case new users are added while the package is installed). Upon de-installation, the package removes the configurations files from the user directories and /etc/skel as the shared object files are removed. I want to mimick that bevavior with an ebuild. To manipulate the existing user directories I am considering to use the ebuild phases pkg_postinst and pkg_postrm. |
|