Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ebuild that removes files from /etc/skel upon unmerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
nagmat84
Guru
Guru


Joined: 27 Mar 2007
Posts: 314

PostPosted: Sun Jun 08, 2025 5:53 pm    Post subject: Ebuild that removes files from /etc/skel upon unmerge Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



OSZAR »