Ok Michal - this looks good, using the bename will let us catch when an external image update invalidates the cache.

One question, is the code in __get_active_be_name() something that we should be reusing between cache.py and beadmin.py?

JR



Michal Pryc wrote:
After offline discussion with John I have spin new webrev:
http://cr.opensolaris.org/~migi/8186_mixing_pkg_gui_v2

This includes the currently active be name and prevents cache being out of date if someone is doing pkg image-update or using the updatemanager. Basically if the current be name is different then the one from the cache, it means, that the cache is out of date.

Michal


Michal Pryc wrote:
It is recreated but for the current BE, so everything is fine :)

Michal

Padraig O'Briain wrote:
When we exit PackageManager after doing an Update All, is the cache recreated on exit?

Padraig

On 04/16/09 16:54, Michal Pryc wrote:
I have updated one thing:

http://cr.opensolaris.org/~migi/8186_mixing_pkg_gui_v1

For the update all the cache is removed. Not doing so, will preserve cache on the cloned BE and in the new BE the PM will have not proper states for the packages.

The change comparing to the previous webrev is in the file:
http://cr.opensolaris.org/~migi/8186_mixing_pkg_gui_v1/src/packagemanager.py.wdiff.html

Line:
2205 +                self.__remove_cache()


best
Michal

Padraig O'Briain wrote:
I now understand how it works.

Looks good to me.

Padraig

On 04/16/09 16:19, Michal Pryc wrote:
Padraig,
All but line:
http://cr.opensolaris.org/~migi/8186_mixing_pkg_gui/src/packagemanager.py.wdiff.html

     2136 +           self.api_o.img.clear_pkg_state()

Which is also needed for 8186 as the states of the packages when doing reload were wrong.

Michal

Padraig O'Briain wrote:
Michal,

Which of the changes fix the test case in bug 8186?

What other problems are you fixing?

Padraig

On 04/16/09 15:09, Michal Pryc wrote:
Hello,

The webrev:
http://cr.opensolaris.org/~migi/8186_mixing_pkg_gui/

Fixes bug:
http://defect.opensolaris.org/bz/show_bug.cgi?id=8186

The idea is to compare the timestamp of the installed folder on startup of the PM and before running install/remove option. If this is different it means that other application modified image and most likely the cache is out of date. Also pressing the reload is blowing out the cache.

Removing cache is simply by dumping the info cache file (without data models) with timestamp set to None, which means that this cache is out of date.




_______________________________________________
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

Reply via email to