bin/updates-available: cache /var/run/updates-available locally, to

persist across reboots, Bug #344993
This commit is contained in:
Dustin Kirkland 2009-03-18 14:15:52 -05:00
commit bc0effbaa3
2 changed files with 6 additions and 3 deletions

View file

@ -49,11 +49,12 @@ mycache_timestamp=`stat -c "%Y" $mycache 2>/dev/null || echo 0`
diff=`expr $now - $cache_timestamp`
u=
# If global updates-available cache is present, and newer than mycache, and
# within expiration, use it.
# within expiration, use it, and cache it (to preserve across reboots).
# Only available in Jaunty+.
if [ -r $cache -a $cache_timestamp -gt $mycache_timestamp -a $diff -lt $EXPIRATION ]; then
u=`grep -m 1 "^[0-9]" $cache | sed "s/\s.*$//"`
s=`grep -m 2 "^[0-9]" $cache | tail -n 1 | sed "s/\s.*$//"`
cp -a "$cache" "$mycache"
print_updates $u $s
fi

6
debian/changelog vendored
View file

@ -1,8 +1,10 @@
screen-profiles (1.40) unreleased; urgency=low
screen-profiles (1.40-0ubuntu1) jaunty; urgency=low
* bin/updates-available: cache /var/run/updates-available locally, to
persist across reboots, LP: #344993
* profiles/logos/suse: added a simple SuSE green on white logo
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 17 Mar 2009 13:26:14 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 18 Mar 2009 14:11:56 -0500
screen-profiles (1.39-0ubuntu1) jaunty; urgency=low