diff --git a/debian/changelog b/debian/changelog index c539ced1..9e2b2ef0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ byobu (5.19) unreleased; urgency=low * === added directory usr/share/sounds, === added directory usr/share/sounds/byobu, usr/share/sounds/byobu/byobu.ogg: LP: #999716 - add byobu sound to repo, as pronounced by Fumihito YOSHIDA + * usr/lib/byobu/updates_available: + - use run-one, rather than run-this-one (which isn't working well) -- Dustin Kirkland Fri, 11 May 2012 15:43:02 -0700 diff --git a/usr/lib/byobu/updates_available b/usr/lib/byobu/updates_available index a61bd994..dfa58a16 100755 --- a/usr/lib/byobu/updates_available +++ b/usr/lib/byobu/updates_available @@ -39,7 +39,7 @@ ___print_updates() { } ___update_cache() { - local mycache=$1 RUN_THIS_ONE= + local mycache=$1 RUN_ONE= # Now we actually have to do hard computational work to calculate updates. # Let's try to be "nice" about it: renice 10 $$ >/dev/null 2>&1 || true @@ -49,26 +49,26 @@ ___update_cache() { # and let the next cache check pick up the results. # Also, try to ensure that no more than one of these run at # a given time; install the run-one package. - command -v run-this-one >/dev/null && RUN_THIS_ONE=run-this-one + command -v run-one >/dev/null && RUN_ONE=run-one if [ -x /usr/lib/update-notifier/apt-check ]; then # If apt-check binary exists, use it - $RUN_THIS_ONE /usr/lib/update-notifier/apt-check 2>&1 | awk '-F;' 'END { print $1, $2 }' > "$mycache" & + $RUN_ONE /usr/lib/update-notifier/apt-check 2>&1 | awk '-F;' 'END { print $1, $2 }' > "$mycache" & elif command -v apt-get >/dev/null; then # If apt-get exists, use it - $RUN_THIS_ONE apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst > $mycache & + $RUN_ONE 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 - $RUN_THIS_ONE pkcon get-updates -p | grep -c '^Package' > "$mycache" & + $RUN_ONE pkcon get-updates -p | grep -c '^Package' > "$mycache" & elif command -v zypper >/dev/null; then # If zypper exists, use it - $RUN_THIS_ONE zypper --no-refresh lu --best-effort | grep -c 'v |' > $mycache & + $RUN_ONE zypper --no-refresh lu --best-effort | grep -c 'v |' > $mycache & elif command -v yum >/dev/null; then # If yum exists, use it # TODO: We need a better way of counting updates available from a RH expert - $RUN_THIS_ONE yum list updates -q | grep -vc "Updated Packages" > $mycache & + $RUN_ONE yum list updates -q | grep -vc "Updated Packages" > $mycache & elif command -v pacman >/dev/null; then # If pacman (Archlinux) exists, use it - LC_ALL=C $RUN_THIS_ONE pacman -Sup | grep -vc "^\(::\| \)" > $mycache & + LC_ALL=C $RUN_ONE pacman -Sup | grep -vc "^\(::\| \)" > $mycache & fi }