commit:     388def77c5bc066c4230c443b84e2477da1ebff2
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 19:44:54 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 19:44:54 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=388def77

kmerge.sh blows away the /usr/src/linux symlink but nothing puts it back in 
place (nessesarily)
add code to properly setup the symlink to the location the freshly installed 
kernel sources

 targets/support/kmerge.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index b72eeb6..3d4afea 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -253,8 +253,12 @@ then
        fi
 
 else
-       [ -L /usr/src/linux ] && rm -f /usr/src/linux
        run_merge "${clst_ksource}" || exit 1
+       #ensure that there is a /usr/src/linux symlink and it points to the 
sources we just installed
+       echo "Adjusting /usr/src/linux to point to \
+$(portageq contents / $(portageq best_visible / "${clst_ksource}" 2>/dev/null) 
2>/dev/null | grep --color=never '/usr/src/' | head -n1 2>/dev/null)"
+       ln -snf $(portageq contents / $(portageq best_visible / 
"${clst_ksource}" 2>/dev/null) 2>/dev/null | grep --color=never '/usr/src/' | 
head -n1 2>/dev/null) \
+               /usr/src/linux
        if [ ! "${clst_kextraversion}" = "" ]
        then
                echo "Setting extraversion to ${clst_kextraversion}"

Reply via email to