Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Distribution of custom patches.

You guys inspired me to give this a try.  I'm patching the docs plugin in the platform feature.  We're not using Maven but just PDE build and the p2 director.  We build our product and all features using PDE build, and then install them into our product layout using the p2 director.  We can install the patch along with all of our other features, or after the fact, and it works great!

BUT.  If we update our patch feature (we make more changes to the CDT docs plugin), and try to update from an installed product, we get the error that Joseph is seeing:  
C/C++ Development Platform (Updated User Guide) is not applicable to the current configuration and will not be installed.

So how do you update a patch?  Is it even possible?

I did some more experimenting as I couldn't find anything on the web.  If I change our builds to not install the patch, but rather doing it manually from the UI in the product itself, I can then update the patch feature to a newer version!  Why?  I compared the profiles of the products.  One with the patch installed via the director on the command line, and the other installed via Install new software.  The only difference in the profile for that patch feature is the value of the 'org.eclipse.equinox.p2.internal.inclusion.rules' property.  The director sets it to STRICT, while the UI sets it to OPTIONAL.

    <iuProperties id='testpatch-feature.feature.group' version='1.0.0.201308081757-225'>
      <properties size='2'>
        <property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='OPTIONAL'/>
        <property name='org.eclipse.equinox.p2.type.root' value='true'/>
      </properties>
    </iuProperties>

I verified that if I edit the profile directly (\p2\org.eclipse.equinox.p2.engine\profileRegistry\profile.profile*.profile.gz) and change STRICT to OPTIONAL then I can update that patch feature as much as I want.  All of our other features are listed in the same way though.  They're all marked as STRICT, but we can update them with no problem.  So it has something to do with it being a patch and marked strict.

I haven't found any way to configure director to set a feature as optional, so I'm not sure what to do.  We could have a post build step to update the profile, or we could just clone/fork CDT and build it ourselves.  Patching seems like a much simpler solution if we could just get it to work.  :)

Thanks,
Warren



-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Joseph Henry
Sent: Tuesday, July 23, 2013 12:24 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Distribution of custom patches.

Ok,

So I am trying to get a feature patch setup and this is what I need to do:

All the information below is for CDT 8.1.2

There is a bug in the org.eclipse.managedbuilder.core plugin that I need to patch.
This plugin is part of the org.eclipse.cdt.platform-feature.

I have an eclipse project with the org.eclipse.cdt.platform-feature and all of the included plugins including org.eclipse.managedbuilder.core.

I created a feature patch project

Name                     = Patch
Feature ID            = org.eclipse.cdt.platform
Feature Version = 8.1.2.201302132326

Included plugins are:

Org.eclipse.cdt.managedbuilder.core (0.0.0) This plugin was mirrored just like all the other ones from the 8.1.2 repo is git. I have put my code change into this version of the plugin.

Now, when I export this feature, and try and update an eclipse install I get this error:

"Patch" is not applicable to the current configuration and will not be installed.

I am not really sure what I am doing wrong.
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Christian Walther
Sent: Tuesday, July 23, 2013 3:13 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] Distribution of custom patches.

Joseph Henry wrote:
> I was able to build using maven 3.0.5. But since I am unable to get the fragment method to work for me my question now is, is there a small subset of plugins I can fork and build to be distributed using our own update site? I really don't want to distribute the entire CDT repo.

We use Feature Patches (http://help.eclipse.org/kepler/topic/org.eclipse.pde.doc.user/concepts/feature.htm) to distribute certain modified CDT plugins as part of our product.

(I think we do end up having the entire CDT on our update site, but that's just because we couldn't find a way of stopping our update site build process from pulling in all dependencies - only our customized plugins come from our own build though, the rest is stock versions mirrored from download.eclipse.org.)

 -Christian
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product.  If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and  destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication.  
Thank you.




Back to the top