* usr/bin/purge-old-kernels:

- Use dpkg first when APT is broken #16
  - https://github.com/dustinkirkland/byobu/pull/16
This commit is contained in:
Dustin Kirkland 2016-12-10 10:03:25 -06:00
commit c88e803c97
2 changed files with 11 additions and 0 deletions

6
debian/changelog vendored
View file

@ -1,8 +1,14 @@
byobu (5.114) unreleased; urgency=medium
[ Dustin Kirkland ]
* usr/bin/purge-old-kernels:
- use apt-get, rather than apt, for compatibility with trusty/precise apt
[ @alexm ]
* usr/bin/purge-old-kernels:
- Use dpkg first when APT is broken #16
- https://github.com/dustinkirkland/byobu/pull/16
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 07 Dec 2016 08:18:12 -0600
byobu (5.113-0ubuntu1) zesty; urgency=medium

View file

@ -66,5 +66,10 @@ if [ -z "$PURGE" ]; then
fi
# Use apt-get, rather than apt, for compatibility with precise/trusty
if ! apt-get install --fix-broken --dry-run >/dev/null 2>&1; then
echo "APT is broken, trying with dpkg"
dpkg --purge $PURGE
apt-get install --fix-broken
fi
apt-get $APT_OPTS remove --purge $PURGE
apt-get $APT_OPTS autoremove --purge