* usr/lib/byobu/updates_available:

- support package kit, LP: #815579
This commit is contained in:
Dustin Kirkland 2011-07-28 00:25:34 -05:00
commit 3bfdbd9724
2 changed files with 8 additions and 0 deletions

2
debian/changelog vendored
View file

@ -17,6 +17,8 @@ byobu (4.23) unreleased; urgency=low
* usr/lib/byobu/ip_address, usr/lib/byobu/network,
usr/lib/byobu/.shutil:
- reuse the get_network_interface function across network operations
* usr/lib/byobu/updates_available:
- support package kit, LP: #815579
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 24 Jul 2011 14:23:38 -0500

View file

@ -50,6 +50,9 @@ ___update_cache() {
elif command -v apt-get >/dev/null; then
# If apt-get exists, use it
apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst > $mycache &
elif command -v pkcon >/dev/null; then
# use packagekit to show list of packages
pkcon get-updates -p | grep -c '^Package' > "$mycache" &
elif command -v zypper >/dev/null; then
# If zypper exists, use it
zypper --no-refresh lu --best-effort | grep -c 'v |' > $mycache &
@ -73,6 +76,9 @@ ___update_needed() {
# Debian/ubuntu
[ "/var/lib/apt" -nt "$mycache" ] || [ "/var/lib/apt/lists" -nt "$mycache" ]
return $?
elif [ -e "/var/lib/PackageKit/transactions.db" ]; then
[ "/var/lib/PackageKit/transactions.db" -nt "$mycache" ]
return $?
elif command -v pacman >/dev/null; then
# Archlinux
for db in /var/lib/pacman/sync/*.db; do