Hi guys,
I'm a Slack noob, but I really enjoy Slackware's simplicity and stability. I'm trying
to build a system based on Slackware these days, I'm now able to write .SlackBuild myself,
but I have some problems with creating symlinks in .SlackBuild and doinst.sh. Yesterday I
wrote a .SlackBuild, and then made the package, installed it in the chroot environment, but
it finally damaged my system. I wrote the following two lines in the doinst.sh file because I thought it would be called from the chroot environment, not from the host:
Code:
(rm -rf /bin)
(ln -sf /usr/bin /bin)
I know this is really stupid! And of course I know where I'm wrong, then I looked at some official SlackBuild scripts, and I found Pat sometimes made symlinks using "relative path" and using "obsolute path" in other times.
So my question is:
1. Never use "obsolute path" with the "rm" command in the build script, right?
2. Is it always safer to use "relative path" in the build script and the post-install doinst.sh script ?
3. What should I pay attention to when install a package using "--root /someplace" compared to just install it in the host?
P.S.: Sorry for my poor english, I wish you will understand what I'm saying.
