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

Re: possible MBF: automatically detecting unused build dependencies


Quoting Don Armstrong (2014-07-07 20:33:37)
> On Mon, 07 Jul 2014, Johannes Schauer wrote:
> > Empty packages are not "detected". The first phase will find empty
> > packages because they do not contain any files and thus they are
> > detected as build dependencies of which no files were used. Since
> > empty packages are mostly meta packages and we do not want to include
> > them, we replace them by a fake equivs package without dependencies.
> > If the build still succeeds, that means that the meta package is
> > indeed not needed.
> Unfortunately, this is not necessarily the case; some builds systems
> disable "optional" functionality if the required build dependency is not
> present, and still let the build complete.

correct. The exact problem here is that a meta package without any actual files
depends on a package without which the build will still successfully complete.

Usually, optional build dependencies are not registered as false positives
because the first pass does a full build with all build dependencies present.
Even if a build dependency could be optional it will not register in this pass
because its files will still be used.

The problem here is that the optional build dependency is not a direct
dependency of the source package.

I cannot think of an automated way to catch dependencies of meta packages
without which the build will still succeed. This of course except if there was
an easy way to compare the build output against the original binary package.
But that's doesnt seem possible yet without reproducible builds.

cheers, josch

Reply to: