[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: Fw: [p2-dev] How to reference a file in a feature's home directory
|
Hey Simon,
> The specific
technique I would use would be to provide an IUFragment to customize the root
file IU using p2.inf.
> This is what Mark's been doing with the exception
that I think he's overriding the root file IU instead of just
> providing a fragment
for it.
Can you explain what you mean by this or provide a quick
example?
If there is a better way to do this with an "IUFragment"
I'm all for doing that. I'm only doing what I am doing because that
is the only thing that appeared to work as a result of my many trial and
error attempts. What is an IUFragment, and will it allow me to override
the default touchpoint behavior for a root file installer? The problem I
have is that no matter what I try - unless I redeclare/override everything
to do with the root file IU - I end up with the default touchpoint behaviour on
the root file IU, and all of my attempts at changing it showing up on the
enclosing feature group (or in new, dangling IUs), and hence having no
effect.
Mark.
As I mentioned earlier, the usability around creating native IUs is still
poor. For the greatest flexibility you could write a tool that integrates in
with the "publisher" providing the appropriate advice to know how to generate
the Native IU and how to attach it into a product.
We talked briefly about
adding a simple utility to do this with a p2.inf and an artifact but have not
done this for 3.5. With that said this is something we could offer at any time
as an independent stand-alone piece.
For now, the eclipse SDK packages
it's native IUs in product/feature root files (e.g. http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_rootfiles.htm)
and until we have better authoring tooling this is the approach I would
suggest.
If a root file is specified for a feature/product an extra
{feature_name}_root IU is generated at metadata publishing time. By default
this IU just adds the actions to unzip relative to the install folder however
you can also further customize the IU to do what you want.
(If you read
through the equinox newsgroup as well as the dev-list you can see some of the
work Mark Melvin has been doing with this approach.)
The specific
technique I would use would be to provide an IUFragment to customize the root
file IU using p2.inf. This is what Mark's been doing with the exception that I
think he's overriding the root file IU instead of just providing a fragment
for it.
It's RC1 week so things are bound to be interesting however
when I get a moment I'll put together a project set to
illustrate.
-Simon
Samuel
Wu---05/10/2009 10:08:06 PM---Can you please provide some instruction on how
to create a native IU? The reason I picked up feature was that I didn't know
the
 From: |
 Samuel
Wu/Toronto/IBM@IBMCA |
 To: |
 p2-dev@xxxxxxxxxxx |
 Date: |
 05/10/2009 10:08 PM |
 Subject: |
 Fw: [p2-dev] How to reference a file
in a feature's home directory |
Can you please provide some instruction on how to
create a native IU? The reason I picked up feature was that I didn't know
there was another alternative. Thanks.
Best Regards
Samuel
Wu
----- Forwarded by Samuel Wu/Toronto/IBM
on 05/10/2009 10:06 PM -----
Simon Kaegi/Ottawa/IBM@IBMCA Sent by:
p2-dev-bounces@xxxxxxxxxxx
05/08/2009 03:35 PM
Please respond to P2 developer discussions
<p2-dev@xxxxxxxxxxx> | |
|
The @artifact syntax has real problems when you're mixing native
touchpoint actions with eclipse touchpoint artifacts so to be honest there
currently isn't a good and consistent way to reference the location where the
feature was placed in unzip or copy. What happens in your case is that when
use @artifact the action will look for an artifact in the native artifact
cache instead of the eclipse touchpoint's cache. I'm not really happy with the
situation and have opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=275404 to see if we can do something with better consistency.
Having a
good access to the artifact location is reasonable however one concern with
the approach you show is around treating features like file containers with
actions to act on their contents. This is a bit of a re-purposing of feature;
it would seem far more sensible to create an independent Native IU and unzip
it's artifact and move it's files around. There are still usability issues
with authoring native IUs and we can work on this however you'll be better off
not overloading features in this way if you can craft native IUs for the
short-term.
-Simon
Samuel
Wu---05/07/2009 01:30:26 PM---Hello there,
 From: |
 Samuel Wu/Toronto/IBM@IBMCA |
 To: |
 p2-dev@xxxxxxxxxxx |
 Date: |
 05/07/2009 01:30 PM |
 Subject: |
 [p2-dev] How to reference a file in a feature's
home directory |
Hello there,
I'm trying to use
the touch point unzip and copy to distribute the files in the file system. I
wonder how to reference the file in the feature's home directory. For
instance, I have a feature project which contains a zip file test.zip. I want
to unzip it to c:\temp. I tried
unzip(source:@artifact/test.zip,target:c${#58}/temp) but
it doesn't seem to work.
The following copy action doesn't work
either.
copy(source:@aritifact/temp/patch.txt,target:c${#58}/temp/patch,overwrite:true)
Can you please
suggest what's the right syntax? Thanks a lot.
Best
Regards
Samuel Wu_______________________________________________
p2-dev mailing
list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________
p2-dev mailing
list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev[attachment "pic08884.gif" deleted by Simon
Kaegi/Ottawa/IBM]
_______________________________________________
p2-dev
mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev