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
mock should fail build early when dynamic build requires are not satisfied #434
Comments
We should at least throw a huge warning that we continue to %build even though |
I don't see what is the hack in mentioned comment. You can have multiple levels of dynamic BRs, so you want to iterate through generating them over and over until all fail or all get installed. |
This is the hack I had in mind. Do you think it is correct, ie that we should ignore rpm |
This is definitely not a hack. The problem is that mock uses |
I don't get it. Can you interpret what the exit status 11 means, then? |
that buildreqs.nosrc.rpm has been generated |
Is this documented somewhere? I read |
I'm not sure if it is documented, however if you pass |
@pmatilai could you please take a look? |
@pmatilai ping |
You're asking the wrong guy, dynamic buildrequires were done by @ffesti and @ignatenkobrain. If @ignatenkobrain says it's working as designed, I guess it is. |
This isn't question about implementation of dynamic requires, but somewhat
Depending on definitive answer to those two, we need to think about either @ignatenkobrain wrote:
... re-try the re-installation of the nosrc.rpm, it doesn't make sense
We need to resolve this somehow to make the overall implementation of |
rpmbuild does not know that because it has been told to use
You can check if all dependencies with rpm without involving dnf, but it was easiest way for me to do it using dnf in mock. |
Maybe we should have a way to do the task without passing
The point is to not even involve rpm, it's sub-optimal ... it would be much |
Here's the relevant RPM commit that introduced dynamic BuildRequires: The reason for rpmbuild returning 11 is that, when processing the dynamic build deps in the spec file, we would set the return code to Unless this behavior is intentional, I think we should go ahead and fix it in RPM. @ffesti, @ignatenkobrain, what's your opinion? |
Meh, I see the problem here now, ... we need We could rely on that if we used --bootstrap-chroot, but it wouldn't be OK to |
As I said many times, this behavior is intentional. Either stop using --nodeps (which is not desirable from what I know) or live with this :) |
@ignatenkobrain What's the rationale behind returning an error code if the user has expressed his desire to not run a dependency check? (just curious) |
@dmnks how else user will be notified that nosrc.rpm is generated and he should explicitly check its dependencies? |
I tested In mock though, we could at least avoid doing the last Perhaps - while we are on that - we could also throw a warning if the new |
Yes, you should use RPM to check if the dependencies are satisfied. However, as I said earlier, it was not trivial to do in the mock codebase.
I'm not sure if we need that. But up to you :) |
@ignatenkobrain What I mean is, when I use |
@dmnks indeed, it's matter of taste -- we use exit status 11 as indication that |
@praiskup OK, I see. Sure, if it works for you this way, then there's no point in changing anything, since nobody else has complained about this particular behavior (and the consensus here seems to be that it's correct). |
Heh, we should actually fix mock to expect exit_status 0 as well as 11 in By doing
So... I eventually think that it is semantically incorrect. That |
OK thanks for the feedback. It does indeed make sense to me, too (to return 0 with |
Before you start with RPM, can we please fix mock first, so we are 100% sure |
@praiskup Yup, thanks, I just noted that in our issue as well: |
per discussion here: rpm-software-management#434 Mock should accept return code 0 from rpm. Relates: rpm-software-management#434
per discussion here: rpm-software-management#434 Mock should accept return code 0 from rpm. Relates: rpm-software-management#434
per discussion here: rpm-software-management/rpm#963 Mock should accept return code 0 from rpm. Relates: rpm-software-management#434
per discussion here: rpm-software-management/rpm#963 Mock should accept return code 0 from rpm. Relates: rpm-software-management#434
per discussion here: rpm-software-management/rpm#963 Mock should accept return code 0 from rpm. Relates: rpm-software-management#434
Per discussion here: rpm-software-management/rpm#963 Mock should accept return code 0 (soon to be implemented in rpm) as well as 11 (compatibility with old versions of rpm). Fixes: #482 Relates: #434
Commit ba5e4ef added a hack
which causes that even if
rpmbuild
returns 11 (some dynamic buildrequiresare missing) mock continues as if rpm succeeded. This has negative that
the build can fail a very late during the %build process.
The problem is that the current released rpm with dynamic BR
support is broken and we can not drop the hack from mock; at
least not till we can expect broken RPM. @hrnciar please link the
RPM bug once it is filled.
The text was updated successfully, but these errors were encountered: