Today I had some “*.pacnew” files within my garuda (through normal updates). So, I remembered that I had at some point a nice script for that (it's very useful). It's called "etc-update" and originally comes from gentoo. Nevertheless, it also does the job for Arch based distros. Sadly within the script they have a check to estimate which "base" OS is in use. And here come my trouble.
Apparently all the other arch based distros (at least most of them) have an ‘ID_LIKE’ attribute in their "/etc/os-release"-file which is filled with "arch". Garuda Linux has here just ‘ID’ which is filled with "garuda". So scripts which make a check for the origin (in this case arch) will run into errors here. In this example it expects to run on "gentoo" and therefor they expect some off their own tooling.
It would be great to have here (/etc/os-release) an additional attribute ‘ID_LIKE=arch’.
Thank you!
Adding a data point here...
One of the scripts which has issues without the "ID_LIKE=arch" is the build script for snapd. I know that snapd is not popular here but it does seem to work so long as you edit /etc/os-release before building it.
Minor additional note:
There appears to be some confusion in the community as to what should be the value in the ID_LIKE attribute. EndeavourOS, for instance, uses "archlinux" instead of "arch".
In reply to the OP while your request may be legit you are playing with fire if you attempt to use Gentoo's solution to automate merging pacnew files. If it was easy to do this safely there would be a dedicated Arch tool for this already.
I have also read more than a few posts on the Arch forum cautioning against using this tool.
I guess like using bleachbit, some will say it's handy automation. Others such as myself will caution it has the potential to cause serious damage with its automation.
I think you are right. I’ve just checked Gentoo wiki on this and it looks like pacdiff.
What I was referring to was another package/method which uses git to track /etc/* changes.
Memory issues…
Yes, I am with you on that (on the main part). I see the danger with those tools. Two years ago I accidentally destroyed my "shadows"-file with such a tool (didn't happen with etc-update yet).
But I am very glad I could help you and point out a small thing to fix.
And also I am always thankful for great new tools and tips. I will try out Etckeeper next time I have to take care about some ".pacnew"-files.