ff1dfe8
--- usr/lib/byobu/updates_available.old	2011-07-24 12:47:09.348399496 +0200
ff1dfe8
+++ usr/lib/byobu/updates_available	2011-07-24 13:04:49.087807911 +0200
ff1dfe8
@@ -44,7 +44,11 @@
ff1dfe8
 	# These are very computationally intensive processes.
ff1dfe8
 	# Background this work, have it write to the cache files,
ff1dfe8
 	# and let the next cache check pick up the results.
ff1dfe8
-	if [ -x /usr/lib/update-notifier/apt-check ]; then
ff1dfe8
+    # packagekit should be available almost everywhere nowadays
ff1dfe8
+    if command -v pkcon >/dev/null; then
ff1dfe8
+        # use packagekit to show list of packages
ff1dfe8
+		pkcon get-updates -p | grep -E '^Package' | wc -l > "$mycache" &
ff1dfe8
+	elif [ -x /usr/lib/update-notifier/apt-check ]; then
ff1dfe8
 		# If apt-check binary exists, use it
ff1dfe8
 		/usr/lib/update-notifier/apt-check 2>&1 | awk '-F;' 'END { print $1, $2 }' > "$mycache" &
ff1dfe8
 	elif command -v apt-get >/dev/null; then
ff1dfe8
@@ -69,6 +73,10 @@
ff1dfe8
 	mycache=$1
ff1dfe8
 	# The cache doesn't exist: create it
ff1dfe8
 	[ ! -e "$mycache" ] && return 0
ff1dfe8
+    # packagekit support
ff1dfe8
+    if -e /var/lib/PackageKit/transactions.db; then
ff1dfe8
+		[ "/var/lib/PackageKit/transactions.db" -nt "$mycache" ] && return 0
ff1dfe8
+	fi
ff1dfe8
 	if command -v apt-get >/dev/null; then
ff1dfe8
 		# Debian/ubuntu
ff1dfe8
 		[ "/var/lib/apt" -nt "$mycache" ] || [ "/var/lib/apt/lists" -nt "$mycache" ]
ff1dfe8
@@ -83,8 +91,13 @@
ff1dfe8
 	return 1
ff1dfe8
 }
ff1dfe8
 
ff1dfe8
+# show name of available update packages
ff1dfe8
+
ff1dfe8
 __updates_available_detail() {
ff1dfe8
-	if command -v apt-get >/dev/null; then
ff1dfe8
+	if command pkcon >/dev/null; then
ff1dfe8
+		detail=`pkcon get-updates -p | grep -E '^Package'`
ff1dfe8
+        printf "$detail"
ff1dfe8
+	elif command -v apt-get >/dev/null; then
ff1dfe8
 		detail=`apt-get -s -o Debug::NoLocking=true upgrade`
ff1dfe8
 		if [ "$1" = "--detail" ]; then
ff1dfe8
 			printf "$detail"