[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] updating a profile

Ciao Guys :)
I'm having a little difficulty understanding updates to a profile, can
you please solve this mystery for me? 

Here is my simple IU - structure:
Group A 1.0.0 -> IU B 1.0.0
Group A 1.0.0 -> IU C 1.0.0

Here is the available updates:
Group A 1.0.1 -> IU B 1.0.1
Group A 1.0.1 -> IU B 1.0.1

Here is what I'm doing:
1.) Run the UpdateChecker and wait for a notification
2.) Based on the UpdateEvent, create a ProfileChangeRequest:
	Add "Group A 1.0.1" to the "IUsToAdd" array of the request
	Add "Group A 1.0.0" to the "IUsToRemove" array of the request
	Note that I don't add the dependent IUs here, only the group
3.) Calculate a provisioning plan and execute it.

Now, here is what happens:
Group A 1.0.1 gets installed
IU A 1.0.1 gets installed
IU B 1.0.1 gets installed
Group A 1.0.0 gets uninstalled

You see? The problem is The IUs A and B, their original versions 1.0.0
remain installed, even after a garbagecollector.runGC(IProfile), so it
looks like the dependencies are correctly resolved for the install phase
but not for the uninstall phase. There is still the chance of me having
a bug in my own code, but could you try and explain the issue, maybe I'm
using something in a terribly wrong way...
Ciao, hh