The RPM mirror implementation incorrectly handles repositories where the modules metadata is published as an uncompressed modules.yaml file instead of modules.yaml.gz.
The issue happens in downloadModules().
When the upstream repository contains:
<data type="modules">
<location href="repodata/<hash>-modules.yaml"/>
</data>
the code downloads the file as:
However, unlike compressed formats (.gz, .bz2, .xz, .zst), the plain YAML case is never renamed or copied to modules.yaml.
Later, the code unconditionally deletes the downloaded file:
unlink($this->workingDir . '/' . $modulesFileTargetName)
As a result:
modules.yaml is never created
- the only downloaded modules metadata file is deleted
- repository metadata generation produces incomplete metadata
The RPM mirror implementation incorrectly handles repositories where the
modulesmetadata is published as an uncompressedmodules.yamlfile instead ofmodules.yaml.gz.The issue happens in
downloadModules().When the upstream repository contains:
the code downloads the file as:
However, unlike compressed formats (
.gz,.bz2,.xz,.zst), the plain YAML case is never renamed or copied tomodules.yaml.Later, the code unconditionally deletes the downloaded file:
unlink($this->workingDir . '/' . $modulesFileTargetName)As a result:
modules.yamlis never created