[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Checking for packages being built twice.



On 26/04/08 at 13:36 +0200, Bernhard R. Link wrote:
> In case someone it looking for an easy QA task, here is some suggestion:
> Search for packages that are configured or built twice in the buildds.
> 
> Theory: The buildds first build the software my telling the debian/rules
> makefile to create the target "build" (hopefully in some future
> "build-arch") and then to create the packages by telling make to create
> the "binary-arch" target using the rules from debian/rules.
> The main reason to seperate those is that the latter needs fakeroot (or
> real root or whatever) while the former does not.
> As the "binary*" targets should also work without having called any
> "build*" target before, they have to list those as prerequisites.
> Thus when the binary target is to be done, make checks the those
> prerequisites are up to date. If there is any phony target (i.e. not
> creating the target as actual file) in the prerequisites of the build,
> make has to rerun those targets, rerunning configure and make again.
> 
> Impact: I guess this is a rather low-profile thing. The impact of those
> bugs is a little more time spent by the buildds and the theoretical
> danger of the second build being garbled by the fakeroot they run in.
> (Fakeroot works by setting some LD_* variables, which some build scripts
> might incorporate, creating invalid binaries).
> 
> Required action: I see no way to check this in lintian (except when this
> actually garbled something), as lintian sees only the generated packages
> and not the log files. So I think the only way to find those is looking
> at the buildd logs for logs that run configure or a compiler after the
> invocation of the "debian/rules binary-arch", which should be an easy
> task if someone is desperately looking for some QA task to do.
> 
> More complicated would be to find packages which do not call configure
> or a compiler twice, but only run make (without install) a second time.
> (Though this has even less impact).

Mmh, wouldn't it be possible to analyze build logs and search for two
(or more) occurences of the same "text"? I can provide build logs for
all packages in Debian if someone is interested. Is there a tool doing
this search already? (it doesn't sound algorithmically trivial to do
efficiently)

Another solution could be to instrument make so that it's easier to
check which targets are being run, and then check for duplicate runs of
the same target.
-- 
| Lucas Nussbaum
| lucas@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lucas@nussbaum.fr             GPG: 1024D/023B3F4F |


Reply to: