[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] patching a group?


Helmut, some answers below..


Helmut wrote on 08/07/2008 07:08:30 AM:

> Ciao Guys :)
> After you @ll helped me understand the profile question I went on and
> started work on a patch repository generator.
> There is one issue I'd like you to clarify:
> - Does p2 support updating single IUs?


Yes, p2 supports updating single IUs.  However, if you have a group that has a feature-style inclusion that specifies an exact version, you won't be able to update the single IU without modifying the group as well. We would really like to move towards groups specifying a wider range on their dependencies, so that individual IUs could be patched without also patching all the associated groups. Assuming the group specified a wider range on an IU, you would be able to update that single IU as long as it remained inside the group's range.

>
> An example: A profile containing these IUs:
>
> Group "A" (1.0.0) -> IU "B" (1.0.0)
> Group "A" (1.0.0) -> IU "C" (1.0.0)
>
> Now, if I want to send out a patch for IU "C", let's say I want to move
> it to "1.0.0.patch", do I need to patch "Group A" as well,
> updating it to "1.0.0.1" and updating the requires statement to the IU B
> but leaving IU C untouched? In theory, I could make the relation
> "group->IU" loose enough so that an update of IU "C" to 1.0.0.patch
> would still fulfil the requirement of the group but thinking about the
> discussion we had last time, IUs that were explicitely installed and
> ones that were only installed because of requirements, I'm not sure
> that's gonna work out. Patch repositories would be really small if only
> those IUs that really were modified were included but my gut tells me we
> need some form of group to ship them...


As you say, this will work if group A has a dependency on C with a range such as [1.0.0,1.1.0) that includes the patched version as well as the original version.  Currently if you are using features the range will be exact: [1.0.0,1.0.0], so the group needs to be modified.
>
> Another reason for asking this is because I'm wondering if there is a
> similar concept to pre-p2 "patch features" (or feature patches, can't
> remember the exact name), where one would send out a completely new
> feature that patched another feature with some content, mapping this
> concept to p2 would look like this:
>
> Group "A" (1.0.0) -> IU C (1.0.0)
> Group "D" (1.0.0) patches Group "A" (1.0.0)
> Group "D" (1.0.0) -> IU C (1.0.0.patch)
>
> Is this supported? What version(s) of IU "C" would be living in my
> profile in this scenario?
> I've seen the concept of a PatchingIU in the code, but this looks very
> feature-centric, so I'm guessing this is a legacy concept not applicable
> to Groups etc..


Yes, it is supported.  This is used in p2 to implement Update Manager patch features, but is the same mechanism we intend to use as the patch mechanism in p2 going forward. The underlying patch infrastructure in p2 is slightly more flexible than UM patch features, and may evolve further in the next release.

John