Yeah, I'm still in the process of going through the bulk of my scripts to make sure they're "sane", as in safe for people other than myself
In the process, I wrote a nice (easy) little script that checks if the contents of a package exist on the filesystem pre-install.
So basically, if you build a package, or if you're about to install a package, you can make sure it isn't going to step on any parts of an existing package by using this:
for i in `tar tzf $1`; do if [ -e "/$i" ]; then echo "found" $i; fi; done
Just copy/paste that into a script (I used slackbuild_sanity.sh), then
chmod +x slackbuild_sanity.sh
you can then just:
The script is really simple, yet seemed like a good idea to me and isn't something I've seen out in the wild, so I figured 'why not?'.
output directories, which is fine by me, since that lets me know it works
The important thing is that it doesn't list any actual files
. Any listed files already exist on your system and will be overwritten by the package you run the script on, should you choose to install said package.
Feel free modify/share/whathaveyou, its a good tool for first-time package builders.
For example, "PyQt" isn't a default Slack 11.0 package, but the PyQt bindings do exist in python 2.4 site-packages. So if you got excited and built PyQt, then ran this script pre-install, you'd realize that you're stepping on an existing package and that the PyQt package isn't actually necessary. At least that's one scenario.