[Rpm-maint] issue with failnonzero = 0 when executing Requires dependency generators

Adam Spiers rpm at adamspiers.org
Thu Jan 31 13:06:05 UTC 2013


On Thu, Jan 31, 2013 at 12:46 PM, Adam Spiers <rpm at adamspiers.org> wrote:
> Hi all,
>
> I have a custom Requires dependency generator which I just noticed was
> silently failing with a non-zero exit code due to an issue with the
> input data it uses.  I was surprised that the rpmbuild run did not
> fail in this case, so I looked more closely and found that this
> appears to be deliberate behaviour:
>
>   http://rpm.org/gitweb?p=rpm.git;a=blob;f=build/rpmfc.c;h=990abab980ccd4fb4774ddc1888973c7bf0e06b7;hb=HEAD#l1147
>
> In other words, if a Provides dependency generator fails, rpmbuild
> will abort, but if a Requires dependency generator fails, rpmbuild
> will ignore it and proceed with the rest of the build, burying any
> potential error messages from the generator somewhere in the middle of
> the rpmbuild output.

Hmm, it seems I misread the code - this applies to the old dependency
generation mechanism, not the new one.  Empirical evidence suggests
for fileattrs-style generators, errors are ignored both for Provides
*and* Requires, so the problem seems worse than I originally thought -
but I didn't yet locate the relevant code to prove this.


More information about the Rpm-maint mailing list