fix(app-shells/bash): Update /etc symlinks, use /usr/share/skel

Symlinks out of /etc to /usr should generally be relative, that way they
work regardless of whether you are based at / or dealing with a new
chroot you haven't entered yet, or a build root like /build/amd64-usr
Namely the absolute links break cros_sdk which copies skel into home.

Also switch to /usr/share/skel since other packages may need install
things to that directory in the future.
This commit is contained in:
Michael Marineau 2014-02-11 22:00:51 -08:00
parent 346c44fbdb
commit 8dc9d76e5e
2 changed files with 13 additions and 8 deletions

View File

@ -138,18 +138,23 @@ src_install() {
mv "${D}"/usr/bin/bash "${D}"/bin/ || die mv "${D}"/usr/bin/bash "${D}"/bin/ || die
dosym bash /bin/rbash dosym bash /bin/rbash
insinto /usr/share/bash/defaults/ insinto /usr/share/bash
doins "${FILESDIR}"/{bashrc,bash_logout} for f in bash{_logout,rc} ; do
dosym /usr/share/bash/defaults/bash_logout /etc/bash/bash_logout doins "${FILESDIR}"/${f}
dosym /usr/share/bash/defaults/bashrc /etc/bash/bashrc dosym ../../usr/share/bash/${f} /etc/bash/${f}
insinto /usr/share/bash/skel done
insinto /usr/share/skel
for f in bash{_logout,_profile,rc} ; do for f in bash{_logout,_profile,rc} ; do
newins "${FILESDIR}"/dot-${f} .${f} newins "${FILESDIR}"/dot-${f} .${f}
dosym /usr/share/bash/skel/.${f} /etc/skel/.${f} dosym ../../usr/share/skel/.${f} /etc/skel/.${f}
done done
sed -i -e "s:#${USERLAND}#@::" "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc sed -i -e "s:#${USERLAND}#@::" \
sed -i -e '/#@/d' "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc "${D}"/usr/share/skel/.bashrc \
"${D}"/usr/share/bash/bashrc
sed -i -e '/#@/d' \
"${D}"/usr/share/skel/.bashrc \
"${D}"/usr/share/bash/bashrc
if use plugins ; then if use plugins ; then
exeinto /usr/$(get_libdir)/bash exeinto /usr/$(get_libdir)/bash