mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* bin/updates_available: print the current cache even if we're
updating the cache Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
a341637be7
commit
83f672cca3
2 changed files with 9 additions and 6 deletions
|
@ -60,17 +60,17 @@ update_cache() {
|
|||
# and let the next cache check pick up the results.
|
||||
if [ -x /usr/lib/update-notifier/apt-check ]; then
|
||||
# If apt-check binary exists, use it
|
||||
exec /usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;/ /" > $mycache &
|
||||
/usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;/ /" > $mycache &
|
||||
elif which apt-get >/dev/null; then
|
||||
# If apt-get exists, use it
|
||||
exec apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst > $mycache &
|
||||
apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst > $mycache &
|
||||
elif which zypper >/dev/null; then
|
||||
# If zypper exists, use it
|
||||
exec zypper --no-refresh lu --best-effort | grep 'v |' | wc -l > $mycache &
|
||||
zypper --no-refresh lu --best-effort | grep 'v |' | wc -l > $mycache &
|
||||
elif which yum >/dev/null; then
|
||||
# If yum exists, use it
|
||||
# TODO: We need a better way of counting updates available from a RH expert
|
||||
exec yum list updates | egrep -v "Updated Packages|Loaded plugins" | wc -l > $mycache &
|
||||
yum list updates | egrep -v "Updated Packages|Loaded plugins" | wc -l > $mycache &
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,8 @@ mycache="$DIR/$PKG.updates-available"
|
|||
if [ "/var/lib/apt" -nt "$mycache" ] || [ "/var/lib/apt/lists" -nt "$mycache" ]; then
|
||||
# If apt is newer than mycache, background an update now
|
||||
update_cache "$mycache"
|
||||
elif [ -r $mycache ]; then
|
||||
fi
|
||||
if [ -r $mycache ]; then
|
||||
# If mycache is present, use it
|
||||
print_updates `grep "^[0-9]" $mycache | sed "s/ .*$//"`
|
||||
else
|
||||
|
|
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -3,9 +3,11 @@ byobu (2.33) unreleased; urgency=low
|
|||
* cpu_count, disk, logo, network, reboot_required, release, temp_c,
|
||||
temp_f, updates_available, wifi: make byobu status scripts friendlier
|
||||
for busybox environments (tested on the Palm Pre), LP: #430096
|
||||
* bin/updates_available: print the current cache even if we're
|
||||
updating the cache
|
||||
* po/byoub-*.po: rename to just *.po, fix translations location, LP: #430095
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 15 Sep 2009 10:09:38 -0500
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 15 Sep 2009 13:36:33 -0500
|
||||
|
||||
byobu (2.32-0ubuntu1) karmic; urgency=low
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue