Community
Participate
Working Groups
Currently the update site parser expects the site file to be called site.xml. With the new category file (which is actually just a site.xml file) this can change. Since we want to reuse as much update site code as possible, we should update the site.xml parser to take a file name so it is not bound to site.xml.
Created attachment 131984 [details] o.e.e.p2.updatesite patch This patch updates the updatesite parser so you can specify a filename. This should allow us to use categories on export and PDE Build. Andrew can you look at this patch.
Created attachment 131985 [details] mylyn/context/zip
Actually Andrew, don't review this yet. After talking with you and Chris today, I am going to rework this a bit. I am going to add a new method to UpdateSite loadCategoryFile(URI, Monitor). This takes a full URI (all the way to the category file) and loads that. The existing method UpdateSite.load does some magic to build the URI (checks to see if the URI ends with site.xml, and appends it if it doesn't etc...). On the PDE Build side I think we should just add a new property to the FeaturesAndBundlesTask. The new property (category) will take a URI. If this property is specified then the CategoryXMLAction will be used. I will probably combine the PDE Build and publisher patch together to make them easier for you to review.
Created attachment 131999 [details] Category support for the publisher and PDE build This patch adds category support for both the publisher and PDE build. I added a new flag to the FeaturesAndBundlesTask -- this flag allows a user to specify a category file. When used, the CategoryXMLAction is exectued.
Created attachment 132000 [details] mylyn/context/zip
Andrew, this patch is ready for review. Let me know if you want any changes. This patch affects both the publisher and PDE build (it contains the fix for Bug 272394 as I thought it would be easier for you to review them together).
Can we not just use CategoryXMLAction all the time? What happens if you pass a site.xml to that action? If we have a seperate attribute for categories, then we need to introduce a new property for UI to pass it through. I would prefer to just have one property which can be either site.xml or category.xml
(In reply to comment #7) > Can we not just use CategoryXMLAction all the time? What happens if you pass a > site.xml to that action? If we have a seperate attribute for categories, then > we need to introduce a new property for UI to pass it through. I would prefer > to just have one property which can be either site.xml or category.xml > The difference between CategoryXMLAction and SiteXMLAction is: - In a siteXML action you can pass a directory (that contains a site.xml) - In a siteXML aciton you can pass a URL to site.xml - In categoryXML you can only pass a URL to any file I assume in the future site.xml and category.xml won't be the same file (this is just an implementation detail right now), so having a new action means we can easily change the format in 3.6. Andrew, what UI property do you mean? We already have a new editor for category files and a new field in the export wizard where these can be specified.
Created attachment 132301 [details] PDE Core / Build and the publisher This patch adds the required changes to use categories to PDE Core, Build and the publisher. Andrew, another reason for introducing a new action goes back to the motivation for this whole thing, we don't want to tell people about update sites anymore. Technically we are using the same file format, but by adding a new field (new UI options, etc...), we are making it clear that update sites are not what you will use going forward.
This should go in M7. Who is ready to review ;)?
ping, This needs to go in for M7 or we should pull the editor out of the UI. The PDE UI side is ready to go (though I made one suggestion on bug 272068).
Created attachment 133208 [details] updated patch For reasons I'm not really sure about, mylyn didn't include all my categoryxml test file in the previous patch. This updates that. Also, I have created a CaegoryXMLActionTest directory under updatesite. I can't include the jars in this patch, so after applying this patch copy updatesite/SiteXMLActionTest directory to updatesite/CategoryXMLActionTest and rename site.xml to category.xml.
Created attachment 133209 [details] updated patch (again) I have no idea what's wrong with either mylyn or cvs patch creation, but it keeps missing files in my patch. I will double check this one.
ok, this last one looks better. ping me if you have any questions.
Curtis, I think we can get this in for M7. We still have the week end ... Ian, I'm confused as to why we need to change the category generation in the p2.updatesite bundle? This was done before if I'm correct.
The site parser made the assumption that it was either passed: 1. a path ending with site.xml or 2. a path that it could append site.xml too the end of so when we tried to pass URLs such as /somelocation/category.xml it would append site.xml to the end. I had to fix this.
done with minor change to FeaturesAndBundlesTask#setCategory. Also added to pde.build.tests. pde.core stuff from the patch is now on bug 272068