Reviewed this offline a few times with Padraig, LGTM.
Minor nit in update-refresh.sh:
Drop the space:
30 +# are available
31 +
32 +# 3. Fetch updates to Packagemanager's Start Page files:
Typo:
64 +# Check and cacahe whether updates are available
JR
cPadraig O'Briain wrote:
I have respun the webrev,
http://cr.opensolaris.org/~padraig/ips-9852-v4/, so that it applies to
the gate and to tidy up the return values from checkforupdates.
Padraig
On 07/15/09 15:32, Padraig O'Briain wrote:
I have spun a new webrev,
http://cr.opensolaris.org/~padraig/ips-9852-v3/.
This webrev adds a call to pm-checkforupdates to
/usr/lib/update-manager/update-refresh.sh, the shell script which is
called by the cron job for updatemanagernotifier.
It also changes updatemanager.py to use pm-checkforupdates to
determine whether updates are available.
On 07/13/09 16:36, Michal Pryc wrote:
Padraig,
checkforupdates:
few functions could be private
Done.
what happens if two separate processes tries to dump the cache?
The most benign possibility is that the last process writes to the
file. The other possibilities, which I think are unlikely, is that
nothing is written to the file or the file is corrupted.
The worst that can happen is that the information is not cached.
what happens if the cache is corrupted ? (simply vi cache_file and
type someting to reproduce this)
I have fixed this so that it behaves as if the file was not present.
Padraig
cache.py:
import time (it's not needed anymore)
the rest LGTM
Michal
Padraig O'Briain wrote:
The webrev, http://cr.opensolaris.org/~padraig/ips-9852-v2/ , fixes
9852 UMN and PM check for updates should use plan_update_all
This webrev does a number of things:
1) Rename um-checkforupdates to pm-checkforupdates and move from
SUNWipkg-um to SUNWipkg-gui.
2) Change packagemanager.py so that it calls pm-checkforupdates to
determine whether Update All button should be enabled.
3) Change checkforupdates.py to use plan_update_all to determine
whether updates are available.
Note that this is quite slow. It takes over 60 seconds on my system.
Following Shawn's suggestion we cache the last_refresh properties
of the publishers in the image and avoid running plan_update_all if
they have not changed.
When pm-checkforupdates is run by updatemanagernotifier it runs as
the logged in user and cannot write to the cache directory.
Padraig
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss