Skip to content

Bug: plain modules.yaml repositories are broken during mirroring #384

@KayTeeFive

Description

@KayTeeFive

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:

modules-temp.yaml

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions