Commit 027233a4 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Make package removal more resilient

parent 8e398d2d
...@@ -1324,16 +1324,16 @@ function jobs () ...@@ -1324,16 +1324,16 @@ function jobs ()
"\nSwitching to \Z1linux-image${TARGET_BRANCH}-${TARGET_FAMILY}\Z0 \n\nWarning: another kernel might not provide\ "\nSwitching to \Z1linux-image${TARGET_BRANCH}-${TARGET_FAMILY}\Z0 \n\nWarning: another kernel might not provide\
the same functionality or can be broken!\n\nBoard config will be reverted to defaults." 12 50 the same functionality or can be broken!\n\nBoard config will be reverted to defaults." 12 50
if [[ $? = 0 ]]; then if [[ $? = 0 ]]; then
# remove old # test install new and remove old if this is successfull
dialog --backtitle "$BACKTITLE" --title "Please wait" --infobox "\nRemoving current kernel." 5 28 dialog --backtitle "$BACKTITLE" --title "Please wait" --infobox "\nRemoving current kernel." 5 28
apt-get -s -y -qq --no-install-recommends install linux-image${TARGET_BRANCH}-${TARGET_FAMILY} \ apt-get -s -y -qq --no-install-recommends install linux-image${TARGET_BRANCH}-${TARGET_FAMILY} \
linux-headers${TARGET_BRANCH}-${TARGET_FAMILY} linux-u-boot-${BOARD}-${UBOOT_BRANCH} \ linux-headers${TARGET_BRANCH}-${TARGET_FAMILY} linux-u-boot-${BOARD}-${UBOOT_BRANCH} \
linux-$(lsb_release -cs)-root$TARGET_BRANCH-$BOARD > /dev/null 2>&1 linux-$(lsb_release -cs)-root$TARGET_BRANCH-$BOARD > /dev/null 2>&1
# if test download is ok, remove old kernel # if test download is ok, remove old kernel
if [[ $? = 0 ]]; then if [[ $? = 0 ]]; then
aptitude remove ~nlinux-image --quiet=100 -y >> /var/log/upgrade.log 2>&1 if [[ $BRANCH == "default" ]]; then BRANCH=""; else BRANCH="-"$BRANCH; fi
aptitude remove ~nlinux-dtb --quiet=100 -y >> /var/log/upgrade.log 2>&1 debconf-apt-progress -- apt -y purge linux-image${BRANCH}-${LINUXFAMILY} linux-headers${BRANCH}-${LINUXFAMILY}
aptitude remove ~nlinux-headers --quiet=100 -y >> /var/log/upgrade.log 2>&1 debconf-apt-progress -- apt -y purge linux-dtb${BRANCH}-${LINUXFAMILY}
fi fi
# install new packages # install new packages
INSTALL_DTB="" INSTALL_DTB=""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment