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 2015-05-13 14:54:44 -07:00 committed by Geoff Levand
parent 9ee6c08a0f
commit 9fb4c0809c

View File

@ -153,11 +153,15 @@ src_install() {
mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/{bashrc,bash_logout}
insinto /etc/skel
insinto /usr/share/bash
for f in bash{_logout,rc} ; do
doins "${FILESDIR}"/${f}
dosym ../../usr/share/bash/${f} /etc/bash/${f}
done
insinto /usr/share/skel
for f in bash{_logout,_profile,rc} ; do
newins "${FILESDIR}"/dot-${f} .${f}
dosym ../../usr/share/skel/.${f} /etc/skel/.${f}
done
local sed_args=(
@ -172,8 +176,8 @@ src_install() {
fi
sed -i \
"${sed_args[@]}" \
"${ED}"/etc/skel/.bashrc \
"${ED}"/etc/bash/bashrc || die
"${ED}"/usr/share/skel/.bashrc \
"${ED}"/usr/share/bash/bashrc || die
if use plugins ; then
exeinto /usr/$(get_libdir)/bash