added support for dnf package manager

https://code.launchpad.net/~sanjay-ankur/byobu/byobu/+merge/415959
This commit is contained in:
Dustin Kirkland 2024-02-10 11:04:14 -06:00
parent 63df0a8c8e
commit fc1b4580a8
2 changed files with 10 additions and 1 deletions

5
debian/changelog vendored
View file

@ -7,8 +7,11 @@ byobu (6.11) unreleased; urgency=medium
* usr/bin/byobu-launcher-install.in: * usr/bin/byobu-launcher-install.in:
- Fix for VSCode, fish and byobu installations - Fix for VSCode, fish and byobu installations
- https://github.com/dustinkirkland/byobu/commit/f917d2169afdec623f5b32723d93bfd91d34b92f#commitcomment-137955113 - https://github.com/dustinkirkland/byobu/commit/f917d2169afdec623f5b32723d93bfd91d34b92f#commitcomment-137955113
* usr/lib/byobu/updates_available:
- added support for dnf package manager
- https://code.launchpad.net/~sanjay-ankur/byobu/byobu/+merge/415959
-- Dustin Kirkland <kirkland@ubuntu.com> Sat, 10 Feb 2024 10:56:13 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Sat, 10 Feb 2024 11:03:36 -0600
byobu (6.10-0ubuntu1) noble; urgency=medium byobu (6.10-0ubuntu1) noble; urgency=medium

View file

@ -85,6 +85,9 @@ ___update_cache() {
# Wolfi updates are cheap (~1s); so update cache every time # Wolfi updates are cheap (~1s); so update cache every time
apk update 2>&1 >/dev/null apk update 2>&1 >/dev/null
apk upgrade --simulate | grep -c " Upgrading " >$mycache 2>/dev/null & apk upgrade --simulate | grep -c " Upgrading " >$mycache 2>/dev/null &
elif eval $BYOBU_TEST dnf >/dev/null; then
# If dnf exists, use it
flock -xn "$flock" dnf list --upgrades -q -y | grep -vc "Available Upgrades" >$mycache 2>/dev/null &
fi fi
} }
@ -141,6 +144,9 @@ ___update_needed() {
# formulae database was updated # formulae database was updated
[ "$(brew --prefix)/Library/Formula" -nt "$mycache" ] [ "$(brew --prefix)/Library/Formula" -nt "$mycache" ]
return $? return $?
elif [ -e "/var/cache/dnf/packages.db" ]; then
[ "/var/cache/dnf/packages.db" -nt "$mycache" ]
return $?
fi fi
return 1 return 1
} }