You are not logged in.
Hi! I'm writing a small package for my own purposes to install some keyboard options I want to add to X. I am adding some files to /usr/share/X11/xkb/, but I also need to modify /usr/share/X11/xkb/rules/evdev, /usr/share/X11/xkb/rules/evdev.lst, and possibly /usr/share/X11/xkb/rules/evdev.xml. The modifications are small -- two or three lines generally, but I'm not sure what the best way to make these modifications are.
Based on what I can find on the wiki, I can proceed one of two ways:
* I can create a patch for the files, apply the patch during build() to the source files, and then put them into the package to replace the existing files.
* I can add a .install file, which either applies the patches after install, or uses echo ... >> to add the appropriate lines to the files.
I'm not sure if I'm missing something, or what the best way to apply these changes is? Which of these options is the cleanest to back out of? And how does pacman handle possible interactions with other packages that might want to modify the same files?
I'm tempted towards the second option because if I use the various hooks it might be easier to back out of the changes?
Thanks,
Ricky
Offline
Neither of these are sane ideas. If you want to modify files which are owned by a package (any package) and not part of the backup array, you have a few options:
1) rebuild the package owning the files with your changes. you'll have to do this for every release.
2) rebuild the package with those files in the backup array. now you're free to change them and they won't be clobbered on upgrade. But, you'll still need to do this every release.
3) change the files anyways, and add them to NoUpgrade in /etc/pacman.conf
package install scriptlets are not meant to be used to arbitrarily modify files.
Offline
Offline
Ah. It looks like what I want is the NoUpgrade entry in pacman.conf. Then the package would only install the necessary symbols files, and print out instructions (perhaps even a diff) for the changes to the rules files.
Thanks!
Ricky
Offline