Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
027233a4
Commit
027233a4
authored
Oct 15, 2018
by
Igor Pecovnik
Browse files
Make package removal more resilient
parent
8e398d2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
027233a4
...
...
@@ -1324,16 +1324,16 @@ function jobs ()
"
\n
Switching to
\Z
1linux-image
${
TARGET_BRANCH
}
-
${
TARGET_FAMILY
}
\Z
0
\n\n
Warning: another kernel might not provide
\
the same functionality or can be broken!
\n\n
Board config will be reverted to defaults."
12 50
if
[[
$?
=
0
]]
;
then
#
remove old
#
test install new and remove old if this is successfull
dialog
--backtitle
"
$BACKTITLE
"
--title
"Please wait"
--infobox
"
\n
Removing current kernel."
5 28
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-
$(
lsb_release
-cs
)
-root
$TARGET_BRANCH
-
$BOARD
>
/dev/null 2>&1
# if test download is ok, remove old kernel
if
[[
$?
=
0
]]
;
then
aptitude remove ~nlinux-image
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-dtb
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-headers
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
if
[[
$BRANCH
==
"default"
]]
;
then
BRANCH
=
""
;
else
BRANCH
=
"-"
$BRANCH
;
fi
debconf-apt-progress
--
apt
-y
purge linux-image
${
BRANCH
}
-
${
LINUXFAMILY
}
linux-headers
${
BRANCH
}
-
${
LINUXFAMILY
}
debconf-apt-progress
--
apt
-y
purge linux-dtb
${
BRANCH
}
-
${
LINUXFAMILY
}
fi
# install new packages
INSTALL_DTB
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment