throws ItemNotFoundException
{
GroupRepository groupRepository = repository.adaptToFacet(GroupRepository.class);
final String requestPath = request.getRequestPath();
if (Action.read.equals(action) && requestPath.endsWith(PATH_OF_REPOMD_XML) && groupRepository != null) {
Yum yum = yumRegistry.get(groupRepository.getId());
if (yum != null && yum instanceof YumGroup) {
for (Repository member : groupRepository.getMemberRepositories()) {
if (member.getRepositoryKind().isFacetAvailable(ProxyRepository.class)) {
try {
log.debug("Fetching {}:{} member of {}", member.getId(), PATH_OF_REPOMD_XML, groupRepository.getId());
member.retrieveItem(new ResourceStoreRequest(PATH_OF_REPOMD_XML));
}
catch (ItemNotFoundException e) {
// proxy repo is not a yum repository, go on
}
catch (Exception e) {
log.debug(
"Could not retrieve {} from {}, member of yum enabled group {}. Ignoring.",
PATH_OF_REPOMD_XML, member.getId(), groupRepository.getId(), e
);
}
}
}
try {
// this will trigger a merge if group yum metadata is dirty and will wait for the task to finish
yum.getYumRepository();
}
catch (Exception e) {
throw new ItemNotFoundException(reasonFor(request, repository, e.getMessage()));
}
}