diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
commit | d18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch) | |
tree | 4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /eclass/kernel-2.eclass | |
parent | e748ba9741f6540f4675c23e3e37b73e822c13a4 (diff) |
gentoo resync : 15.06.2021
Diffstat (limited to 'eclass/kernel-2.eclass')
-rw-r--r-- | eclass/kernel-2.eclass | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 2d721ffca878..20c83b37c1fd 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -945,8 +945,6 @@ preinst_headers() { # see inline comments postinst_sources() { - local MAKELINK=0 - # if we have USE=symlink, then force K_SYMLINK=1 use symlink && K_SYMLINK=1 @@ -960,15 +958,11 @@ postinst_sources() { # if we are to forcably symlink, delete it if it already exists first. if [[ ${K_SYMLINK} -gt 0 ]]; then - [[ -h ${EROOT%/}/usr/src/linux ]] && { rm "${EROOT%/}"/usr/src/linux || die; } - MAKELINK=1 - fi - - # if the link doesnt exist, lets create it - [[ ! -h ${EROOT%/}/usr/src/linux ]] && MAKELINK=1 + if [[ -e ${EROOT%/}/usr/src/linux && ! -L ${EROOT%/}/usr/src/linux ]] ; then + die "${EROOT%/}/usr/src/linux exist and is not a symlink" + fi - if [[ ${MAKELINK} == 1 ]]; then - ln -sf linux-${KV_FULL} "${EROOT%/}"/usr/src/linux || die + ln -snf linux-${KV_FULL} "${EROOT%/}"/usr/src/linux || die fi # Don't forget to make directory for sysfs |