Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] [equinox-dev] Best way to contribute values (eg PGP keys) with OSGi?

One clarification.  I recommend for such things like "path" that a directive is used vs. an attribute.  Directives are things that "direct" the user of the capability for certain things.  For example, the "resolution" directive instructs the resolver if the requirement is optional or mandatory.  Attributes are used for properties that describe the capability for which some filtering may be desired.  I see no value in being able to filter on the path value here.  For example, if PGP has a name, originator, or some other attribute that would be useful to filter on then these could be specified as attributes.
 
So a path directive is specified much like attributes but a ":=" is used instead:
 
Bundle-Capability: org.eclipse.equinox.p2.pgp.key; path:="/path/to/pgp/key/file"
 
And you would access the capability directive with c.getDirectives().get("path").  Note that directive values must always be String where attributes have a few different supported value types (where String is the default attribute type when no type is specified on the capability side).

Tom
 
 
 
----- Original message -----
From: "Mickael Istria" <mistria@xxxxxxxxxx>
Sent by: "p2-dev" <p2-dev-bounces@xxxxxxxxxxx>
To: "Equinox development mailing list" <equinox-dev@xxxxxxxxxxx>
Cc: "P2 developer discussions" <p2-dev@xxxxxxxxxxx>
Subject: [EXTERNAL] Re: [p2-dev] [equinox-dev] Best way to contribute values (eg PGP keys) with OSGi?
Date: Wed, Dec 1, 2021 10:47 AM
 
 
 
On Wed, Dec 1, 2021 at 5:08 PM Thomas Watson <tjwatson@xxxxxxxxxx> wrote:
 
For example, define a new capability namespace called "org.eclipse.equinox.p2.pgp.key".  I'm not sure what sorts of attributes you need to describe the pgp key outside of just the path to the file in the resource.  But you could have an attribute "path" to describe the path:
Bundle-Capability: org.eclipse.equinox.p2.pgp.key; path="/path/to/pgp/key/file"
[...]
 
Thanks a lot Thomas. I'll follow that path!
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/p2-dev
 



Back to the top