[Rpm-maint] Where to add new provides/dependency generator

Kyu Lee klee at redhat.com
Thu May 3 16:02:28 UTC 2007


On Thu, 2007-05-03 at 10:09 +0100, Paul Nasrat wrote:

> 
> Could you attach it?

Sure, but need some testing and bug fixing has to be done.


> 
> Out of curious what is the mechanism to determine this? We use file(1)
> atm - is there any additional magic or do you have to peek inside the
> jar.  Can you point me at documentation of the OSGi format.

>From OSGi specification R4[1], OSGi jar is defined as,

"A bundle is deployed as a Java ARchive (JAR) file. JAR files are used
to store applications and their resources in a standard ZIP-based file
format. This format is defined by [27] Zip File Format." -pg.33

.
.
.

"A bundle can carry descriptive information about itself in the manifest
file that is contained in its JAR file under the name of
META-INF/MANIFEST.MF. The Framework defines OSGi manifest headers such
as Export-Package and Bundle-Classpath, which bundle developers use to
supply descriptive information about a bundle. Manifest headers must
strictly follow the rules for manifest headers as defined in [28]
Manifest Format." -pg.34



So what I did is peek inside jar file and see if META-INF/MANIFEST.MF is
present, and if so, looks for valid OSGi manifest headers to determine
what this bundle provides/requires.




Kyu



[1] -
http://www.osgi.org/osgi_technology/download_specs.asp?section=2#Release4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osgi-find-provides.perl
Type: application/x-perl
Size: 1710 bytes
Desc: not available
Url : http://lists.rpm.org/pipermail/rpm-maint/attachments/20070503/204e14e3/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osgi-find-requires.perl
Type: application/x-perl
Size: 1972 bytes
Desc: not available
Url : http://lists.rpm.org/pipermail/rpm-maint/attachments/20070503/204e14e3/attachment-0003.bin 


More information about the Rpm-maint mailing list