Skip to content

Avoid dependency cycles with glibc-langpack-en#1224

Merged
ekohl merged 1 commit intotheforeman:masterfrom
ekohl:hack-around-dependency-cycles
May 9, 2025
Merged

Avoid dependency cycles with glibc-langpack-en#1224
ekohl merged 1 commit intotheforeman:masterfrom
ekohl:hack-around-dependency-cycles

Conversation

@ekohl
Copy link
Member

@ekohl ekohl commented May 9, 2025

By calling stdlib::ensure_packages() in the class itself the resource gets tied to the class. If other packages also depend on the resource, you can get dependency cycles.

In particular, candlepin also does this and that causes a dependency cycle.

By using a class that is included the resource "floats" in the catalog. We then only ensure the package is installed somewhere before we create the database.

Link: theforeman/puppet-candlepin@ca77145
Fixes: 768a54e ("Ensure glibc-langpack-en is always installed on EL")

By calling stdlib::ensure_packages() in the class itself the resource
gets tied to the class. If other packages also depend on the resource,
you can get dependency cycles.

In particular, candlepin also does this and that causes a dependency
cycle.

By using a class that is included the resource "floats" in the catalog.
We then only ensure the package is installed somewhere before we create
the database.

Link: theforeman/puppet-candlepin@ca77145
Fixes: 768a54e ("Ensure glibc-langpack-en is always installed on EL")
@ekohl ekohl added the Bug label May 9, 2025
@ekohl ekohl merged commit fda546f into theforeman:master May 9, 2025
13 checks passed
@ekohl ekohl deleted the hack-around-dependency-cycles branch May 9, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants