Project

Profile

Help

Task #7021

Updated by daviddavis over 4 years ago

The [artifacts property on RepositoryVersion](https://github.com/pulp/pulpcore/blob/203f9d20f617cffd58afaf469b37c552a7f5ba9c/pulpcore/app/models/repository.py#L499) assumes that artifacts are all directly attached to RepositoryVersion Content: 

 ``` 
 RepositoryVersion 
    | 
 Content 
    | 
 Artifacts 
 ``` 

 But with DistributionTrees, this is not completely the case. There are also artifacts nested in repos: 

 ``` 
 RepositoryVersion 
    | 
 DistributionTree 
    | 
 Repository/RepositoryVersion 
    | 
 Content 
    | 
 Artifacts 
 ``` 

 This means that not all artifacts will get exported when the DistributionTree is exported. 

 ## Solution 

 Have the artifacts property method call a Repository method to determine what artifacts it has. This is needed since RepositoryVersion is not typed. Then pulp_rpm (and other plugins) can override this method to add in artifacts from DistributionTrees. 

 ### Possible Alternative(s) 

 Add a some sort of hook to the [artifact export code](https://github.com/pulp/pulpcore/blob/203f9d20f617cffd58afaf469b37c552a7f5ba9c/pulpcore/app/tasks/export.py#L221-L233) that will allow plugins to define what add extra artifacts belong to a repo version. that they need exported.

Back