From 0385c60fb0c82fa7c4cac93c26dcb51dfec2b84b Mon Sep 17 00:00:00 2001 From: Mike khiretskiy Date: Wed, 21 May 2014 16:04:50 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=B2=D0=BE=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=81=D1=86=D0=B5=D0=BD=D0=B0=D1=80=D0=B8=D0=B8?= =?UTF-8?q?=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8=20=D1=8F=D0=B4=D1=80?= =?UTF-8?q?=D0=B0-6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eclass/calculate-kernel-6.eclass | 2 +- eclass/calculate.eclass | 28 ++++------------------------ 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/eclass/calculate-kernel-6.eclass b/eclass/calculate-kernel-6.eclass index 2f2185f37..c7a9eaab1 100644 --- a/eclass/calculate-kernel-6.eclass +++ b/eclass/calculate-kernel-6.eclass @@ -132,7 +132,7 @@ vmlinuz_pkg_postinst() { # install kernel into /boot calculate_update_ver /boot vmlinuz ${KV_FULL} /usr/share/${PN}/${PV}/boot/vmlinuz-${KV_FULL} calculate_update_ver /boot config ${KV_FULL} /usr/share/${PN}/${PV}/boot/config-${KV_FULL} - calculate_update_ver /boot initramfs ${KV_FULL} /usr/share/${PN}/${PV}/boot/initramfs-${KV_FULL} + calculate_update_ver /boot initramfs ${KV_FULL} /usr/share/${PN}/${PV}/boot/initramfs-${KV_FULL} .img calculate_update_ver /boot System.map ${KV_FULL} /usr/share/${PN}/${PV}/boot/System.map-${KV_FULL} # install firmware into / mkdir -p ${ROOT}/lib/firmware diff --git a/eclass/calculate.eclass b/eclass/calculate.eclass index 4374a9127..a0d9307b6 100644 --- a/eclass/calculate.eclass +++ b/eclass/calculate.eclass @@ -495,32 +495,12 @@ calculate_update_ver() { local fn=$2 local ver=$3 local src=$4 - if [ -f "$dir/$fn-$ver" ] ; then - mv "$dir/$fn-$ver" "$dir/$fn-$ver.old" + local suffix="$5" + if [ -f "$dir/$fn-$ver$suffix" ] ; then + mv "$dir/$fn-$ver$suffix" "$dir/$fn-$ver$suffix.old" fi - cat "$src" > "$dir/$fn-$ver" - - # This section is for backwards compatibility only - if test -f "$dir/$fn" ; then - # The presence of "$dir/$1" is unusual in modern intallations, and - # the results are mostly unused. So only recreate them if they - # already existed. - if test -L "$dir/$fn" ; then - # If we were using links, continue to use links, updating if - # we need to. - if [ "$(readlink -f ${dir}/${fn})" = "${dir}/${fn}-${ver}" ]; then - # Yup, we need to change - ln -sf "$fn-$ver.old" "$dir/$fn.old" - else - mv "$dir/$fn" "$dir/$fn.old" - fi - ln -sf "$fn-$ver" "$dir/$fn" - else # No links - mv "$dir/$fn" "$dir/$fn.old" - cat "$src" > "$dir/$fn" - fi - fi + cat "$src" > "$dir/$fn-$ver$suffix" } # FUNCTION: calculate_fix_lib_modules_contents