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

Adam Spiers rpm at adamspiers.org
Thu Jan 31 12:46:00 UTC 2013


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.

This behaviour is not mentioned in the only documentation I could find
on dependency generators[0]:

  http://www.rpm.org/wiki/PackagerDocs/DependencyGenerator

There *may* be good reasons I am unaware of for a Requires generator
to fail in the semantic sense (i.e. when the generator cannot
determine any dependencies in a context where this is still considered
acceptable).  However unfortunately it makes it impossible to detect
the cases where the failure was unexpected and unacceptable.

Therefore I would like to propose changing this behaviour.  Presumably
it would be easy to change any generators which currently rely on
failure being tolerated, so that they return success?

Thoughts?

Thanks,
Adam

[0] which by the way is still marked "*** DRAFT ***" despite the
    feature being around for quite a while now - what else needs to be
    documented in order to remove this draft label?


More information about the Rpm-maint mailing list