Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: repoclosure shouldn't fail on conditional dependencies #549

Open
bstinsonmhk opened this issue Aug 12, 2024 · 4 comments
Open

RFE: repoclosure shouldn't fail on conditional dependencies #549

bstinsonmhk opened this issue Aug 12, 2024 · 4 comments

Comments

@bstinsonmhk
Copy link

bstinsonmhk commented Aug 12, 2024

We run repoclosure as part of the compose process to check that all deps are resolved. In a compose that contains packages with conditional dependencies we have a number of failures in the log files that look like this:

package: pyproject-srpm-macros-1.12.0-2.el10.noarch from CentOS-Stream-10-20240812.0-repoclosure-    AppStream.x86_64
  unresolved deps:
    (pyproject-rpm-macros = 1.12.0-2.el10 if pyproject-rpm-macros)

It would be great if there was a way to satisfy the conditional during the repoclosure run, but if not, we should make these warnings rather than failures.

@yselkowitz
Copy link

FWIW dnf5 repoclosure appears to have the same issue.

@jan-kolarik
Copy link
Member

Hi Brian,

It seems there might be an issue with the arguments passed to repoclosure. I tested dnf repoclosure --pkg pyproject-srpm-macros in a Fedora 39 container, and it worked correctly—I got an empty output while I've checked the conditional dependency was present.

However, Fedora uses best=False, while on RHEL, it's set to best=True. This difference affects the behavior of the repoclosure plugin. When best=True, dependencies are resolved only against the latest versions of packages in the repositories, while with best=False, any package from the repositories can be used. This behavior is documented in the sources here, though the official user documentation isn't clear on this point. We should definitely work on improving it.

I think this issue only occurs when there are multiple versions of a package in the repositories. At this point, I don't see a better solution than using the --nobest option.

@m-blaha
Copy link
Member

m-blaha commented Aug 30, 2024

It does not work correctly for example in case the package after if does not exist. In such case the conditional requirement should be resolved as true, but it does not. (e.g. (NOT_EXIST > 3 if NOT_EXIST)).

@jan-kolarik
Copy link
Member

@bstinsonmhk Bump. Would passing the --nobest work in your context or is there a different issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

4 participants