[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Reconciling two profiles


As you guessed, doing a "become" followed by an installation of the bits
installed in the user profile will cause a loss of information, since after
the completion of the become the profile will have completely forgotten
about the user IUs (the IUs that had been installed in the user profile)
with all the consequences this could mean.
Given that the current implementation of "become" analyzes the dependencies
and adds what is necessary for satisfaction of the installation, what you
may want to do is:
- create a profile IU  that refers to:
    1 all the IUs referred to from the shared profile
    2 all the user IUs, (maybe not all, but just the ones that were
installed by the user in the first place (entry points))
- call become on the IU resulting from the previous computation.

Another approach, that may not work with the current implementation but may
worth thinking about is:
- the user profile contains an IU representing the shared profile (if you
were to list the IUs in the profile you would see this IU).
- then, when the shared profile changes, the reconciliation operation
consists in replacing (IDirector.replace()) the IU representing the old
version of the shared profile by the new one and "let the magic happen"
Pros of this approach:
- it is really explicit that this profile is 'derived' from another one
since there is a reference to it
- the reference to the profile may turn out to be problematic when the user
IUs need to cause changes in what is referred from it
- reconciliation could only happen on such profiles, whereas the concept of
reconciliation is interesting in other contexts (for example, I want to
make my profile like Andrew's one but I want to keep the IUs that I had).



  From:       Andrew Overholt <overholt@xxxxxxxxxx>                                                                 
  To:         equinox-dev@xxxxxxxxxxx                                                                               
  Date:       09/10/2007 03:16 PM                                                                                   
  Subject:    [equinox-dev] Reconciling two profiles                                                                


As we discussed on the call today, Tim and I have been working on a
Reconciler.  Pascal mentioned his contentiously-named become operation
in the Director.  This is very similar to what I wrote in our Reconciler
but now I'm at the stage where I want to "re-install" what was initially
in the "user" (for lack of better source/target mandatory/optional
terminology) profile.  Should we do just that:  re-install the IUs that
were previously there?  That would be simple and we could just use
Director.become and then a bunch of install operations.  But will this
mess up preferences or other things that may be stored in profiles?
What about stuff that was configured in the profile?  Ideally everything
would be the same as it was before except if it _needed_ to be changed
by the morphing of the underlying "base" profile.


(See attached file: attayt6r.dat)
equinox-dev mailing list

Attachment: attayt6r.dat
Description: Binary data