Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Touchpoints and multiple bundles installing same binary
Touchpoints and multiple bundles installing same binary [message #129527] Tue, 21 April 2009 16:59 Go to next message
Eclipse UserFriend
Originally posted by: mark_melvin.amis.com

Hi there,

I am looking at P2 again and I have a specific question about touchpoints.
We currently have a fairly complicated install handler written that
allows us to author plugins that can install external files onto the
computer when a plugin is installed via the old update manager.
Consequently, when a plugin is removed using the update manager it should
remove any external files that it installed.
We have many products, and some features and bundles are shared between
them. These products can co-exist in a particular Eclipse installation.
These products are basically features adding support for different flavors
of hardware, but they contain a lot of common bits and pieces. Therefore,
we need to be careful when removing files.

For example, lets say that "product A" and "product B" both include a
feature or bundle that "installs" a binary by the name of 'something.exe'
onto the users computer. If the user decides to later uninstall "product
B", then 'something.exe' cannot be blindly deleted, because it is still
required for "product A" to function. The way we have handled this is to
maintain a small database (a simple file) that contains reference counts
of files that were installed by bundles, and the file will only removed
when its reference count goes to zero.

So, my question is - how can I accomplish this same thing in P2? It seems
to me that the only solution would be to declare a separate "installable
unit" for every external file that I want to install using a native
touchpoint, but what is confusing me is how to integrate that into a
build. Is the only way to use a p2.inf file currently in a bundle,
feature, or .product file? We don't build from .product files, so that
would mean we would have to:

a) Write the metadata from scratch and somehow inject it into the metadata
repository at build time
b) Wrap every external file in a bundle

So, option b) is icky, which leaves option a). Is possible to accomplish
a)? What can constitute a metadata repository anyway - is it just a
single "content.jar" file that contains a single .xml file, or can it be
made up of lots of smaller files or "import" other files?

Mark.
Re: Touchpoints and multiple bundles installing same binary [message #129724 is a reply to message #129527] Wed, 22 April 2009 17:01 Go to previous message
Eclipse UserFriend
Originally posted by: mark_melvin.amis.com

Hmm.. this page is interesting:

http://wiki.eclipse.org/Equinox/p2/GeneratingCUs

In particular, this paragraph:

"We can also decide to require other .configured features instead of
including them. Consider features that don't form products on their own
but are commonly bundled into other products. If such a feature required
configuration of its own, it could require configuration of platform
instead of including it."

P2 Gurus - will this accomplish what I am describing below? And is it
better to create these "configuration" items as plugins, or features (I
didn't realize you could create an empty feature like that)?

Mark.

Mark Melvin wrote:

> Hi there,

> I am looking at P2 again and I have a specific question about touchpoints.
> We currently have a fairly complicated install handler written that
> allows us to author plugins that can install external files onto the
> computer when a plugin is installed via the old update manager.
> Consequently, when a plugin is removed using the update manager it should
> remove any external files that it installed.
> We have many products, and some features and bundles are shared between
> them. These products can co-exist in a particular Eclipse installation.
> These products are basically features adding support for different flavors
> of hardware, but they contain a lot of common bits and pieces. Therefore,
> we need to be careful when removing files.

> For example, lets say that "product A" and "product B" both include a
> feature or bundle that "installs" a binary by the name of 'something.exe'
> onto the users computer. If the user decides to later uninstall "product
> B", then 'something.exe' cannot be blindly deleted, because it is still
> required for "product A" to function. The way we have handled this is to
> maintain a small database (a simple file) that contains reference counts
> of files that were installed by bundles, and the file will only removed
> when its reference count goes to zero.

> So, my question is - how can I accomplish this same thing in P2? It seems
> to me that the only solution would be to declare a separate "installable
> unit" for every external file that I want to install using a native
> touchpoint, but what is confusing me is how to integrate that into a
> build. Is the only way to use a p2.inf file currently in a bundle,
> feature, or .product file? We don't build from .product files, so that
> would mean we would have to:

> a) Write the metadata from scratch and somehow inject it into the metadata
> repository at build time
> b) Wrap every external file in a bundle

> So, option b) is icky, which leaves option a). Is possible to accomplish
> a)? What can constitute a metadata repository anyway - is it just a
> single "content.jar" file that contains a single .xml file, or can it be
> made up of lots of smaller files or "import" other files?

> Mark.
Previous Topic:Eclipse Jetty & Log Files
Next Topic:Update Hook Adapter fragment
Goto Forum:
  


Current Time: Sat Apr 27 01:01:15 GMT 2024

Powered by FUDForum. Page generated in 0.03337 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top