Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup should ignore artifacts which don't match the aggregator property list #143

Open
SvenEwald opened this issue Jan 15, 2016 · 9 comments
Assignees

Comments

@SvenEwald
Copy link

Version 0.11.6
After generating a P2 feature or category or uploading a category.xml, there is no feature or category shown in channel content.
Accessing the channel via eclipse does not show category or feature.
No erro shown in log.

@ctron ctron added the bug label Jan 15, 2016
@ctron ctron self-assigned this Jan 15, 2016
@ctron ctron added need info and removed bug labels Jan 15, 2016
@ctron
Copy link
Owner

ctron commented Jan 15, 2016

I just tried to reproduce this. But for me this works.

So I do need a bit more information. Or if possible a sample channel.

Do you have the P2 Metadata aspect active in this channel?

@SvenEwald
Copy link
Author

It works in a new created channel, so I removed aspects until it worked in my update site channel. Reason was the cleanup aspect.
I use the core information aspect to exctract osgi:name and osgi:version
The cleanup is aggregating over osgi:name and sorting by osgi:version, number of entries is one.
This setup seems to delete the category.xml
Can I use the cleanup, keeping only the last version of a bundle and use a category.xml ?

@ctron
Copy link
Owner

ctron commented Jan 15, 2016

Actually the core information aspect should provide core:name and the OSGi aspect will provide osgi:name. Of course any artifact that is not an OSGi bundle will not have osgi:name set. So these will get aggregated into a "empty string" group and only one of those "empty string" artifacts will survive.

Can you make a test of the cleanup with the "Test" button, this should give a pretty good overview of what will happen during the clean up.

@SvenEwald
Copy link
Author

I understand the reason for the effect. But this means we can have either a category in the update site, or having automatic cleanup. Right? I smell a missing feature ;-)

@ctron
Copy link
Owner

ctron commented Jan 15, 2016

It always smells like missing features ... and I really hope they small like 🍔

So if your are bound to using osgi:name I fear "yes". If you can use core:name is should be possible, since they are different.

Without having tested it, there may be a way to use an additional property, assign it to the category and include this in the list of aggregating fields. Since this should collapse to an empty string for OSGi bundles and would not make a difference then.

@SvenEwald
Copy link
Author

For OSGI bundles, the core:name is the filename. So this can not be used for aggregation, because it contains the version.
I'm not bound to the osgi:name, but the maven group id and artifact id don't work for osgi bundles.

@ctron
Copy link
Owner

ctron commented Jan 15, 2016

So in the end, if the artifacts does not have the property osgi:name you want to ignore it? Right?

So I could add a feature that an artifact is only considered for cleanup if "all aggregation properties are present".

@ctron
Copy link
Owner

ctron commented Jan 15, 2016

Just as a side note ... I am currently working on a feature to actually trigger the clean up in different instances (per channel) at different times (timer, artifact upload, …) However, this will take a bit longer to implement and will not make it into 0.11.x and 0.12.x.

@SvenEwald
Copy link
Author

This could solve my requirement. In the mean time I will disable the cleanup and manually delete old snapshot bundles. (Every commit adds a new bundle with new qualifier)
Alternative could be a whitelist of artifacts not to be cleaned. Whatever is easier.

@ctron ctron changed the title Adding generated artifacts has no effect any more Cleanup should ignore artifacts which don't match the aggregator property list Jan 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants