checks/rules returns
Okay, I said that I was going to slow down, but I kept thinking about how
to do this and kept looking at all the old bugs we could close with this
infrastructure and decided to go ahead and implement it.
checks/rules is now back, using the make -p suggestion from debian-devel a
while back. Here are the details on how we run make:
# Some explanation of the magic here: -p says to print the database, which
# lets us use make as the makefile parser instead of having to do it
# ourselves. -q is like -n but does even less, since we're throwing away the
# results (but means either 0 or 1 is a non-error exit status). -r and -R
# suppress implicit rules and variables, which we're not interested in and
# which just bloat the output that we have to throw away and slow things down.
# Finally, MAKE=true prevents make from using its magic handling of make
# recursion, which we don't want it to try because the other makefiles that we
# may be trying to recurse into probably haven't been created yet.
unless ($includes) {
open(MAKE, 'env - PATH="$PATH" make -f debfiles/rules -qprR MAKE=true |')
or fail("Cannot run make: $!");
I think this should solve all the problems that were encountered before.
Also, debian/rules files that include other makefiles are skipped
completely and assumed to be okay, which keeps the output consistent and
doesn't require that build-depends be installed to run lintian.
This will clearly require a fair bit of testing. I'm going to run this
against a subset of a local mirror and make sure it doesn't turn up
anything strange or any odd failures. The more other people can test, the
better.
I just committed the first steps and initial framework, which closes a
couple of bugs, but at least #119097 and #325372 should be done in this
file as well and should be fairly straightforward to handle.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: