Discussion:
[tycho-dev] What is mean by artifact.size in artifact.xml generated inside p2 repo
Kasun Siyambalapitiya
2017-07-13 09:07:28 UTC
Permalink
Hi all,

I am trying to understand how the p2 plugin actually works and tried a
small scenario where few features and bundles were installed to the
p2-repo. When the p2-repo generation was successful I found out a`
*artifact.xml*` file located inside the *artifact.jar.* ( please find my
artifact.xml below).

By observing the details, I was able to found out that *<property
name='download.size' value='10222'/> *is showing the actual size of my
artifact while* <property name='download.contentType'
value='application/zip'/> * is showing the type of the artifact. What is
shown by * <property name='artifact.size' value='4096'/> ?*

Why is it simillar in most of the entries?.

Thank you,
--
*Regards,*

*Kasun Siyambalapitiya*
*Software Engineer*
WSO2 Inc. - http://wso2.com/
lean . enterprise . middleware
Tel : 0715523466
E mail : ***@wso2.com
<https://wso2.com/signature>
Mykola Nikishov
2017-07-13 21:46:55 UTC
Permalink
Post by Kasun Siyambalapitiya
By observing the details, I was able to found out that *<property
name='download.size' value='10222'/> *is showing the actual size of my
artifact
org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor.DOWNLOAD_SIZE:

An artifact descriptor property (value "download.size") indicating
the number of bytes that will be transferred when this artifact is
transferred out of the repository.
Post by Kasun Siyambalapitiya
while* <property name='download.contentType' value='application/zip'/>
* is showing the type of the artifact. What is shown by * <property
name='artifact.size' value='4096'/> ?*
org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor.ARTIFACT_SIZE:

An artifact descriptor property (value "artifact.size") indicating
the size in bytes of the artifact in its native format (after
processing steps have been applied).
Post by Kasun Siyambalapitiya
Why is it simillar in most of the entries?.
It is the same (4096 bytes) for features only (content-type is
application/zip). My guess would be because of the bug #509401 in
general and this fix [1].

[1] https://git.eclipse.org/c/equinox/rt.equinox.p2.git/commit/?id=5be3ee98548c39fa52804fbb4ce2c1d3c647a63b
--
Mykola
https://manandbytes.github.io/
Sievers, Jan
2017-07-14 10:33:22 UTC
Permalink
Post by Mykola Nikishov
An artifact descriptor property (value "artifact.size") indicating
the size in bytes of the artifact in its native format (after
processing steps have been applied).
Why is it simillar in most of the entries?.
IIRC an example of a p2 "processing step" is unpacking a pack200-compressed file.
So the download size would be the pack200 size while the artifact size would be the unpacked jar size in this case.

Jan

Loading...