You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
josch 637aa89de1 add readme and sbuild patch 10 years ago
0001-add-pre-realbuild-commands-and-post-realbuild-comman.patch add readme and sbuild patch 10 years ago
README.md add readme and sbuild patch 10 years ago
findunusedbd.sh initial commit 10 years ago

README.md

Use fatrace to record all file access during an sbuild run and find those build dependencies which have their files never needed. You need superuser privileges to run this script because of fatrace.

Run it like follows. In one terminal execute:

$ ./findunusedbd.sh

In another run sbuild like this:

$ sbuild \
	--chroot-setup-commands='/home/user/path/to/findunusedbd.sh chroot-setup' \
	--pre-realbuild-commands='/home/user/path/to/findunusedbd.sh pre-realbuild' \
	--post-realbuild-commands='/home/user/path/to/findunusedbd.sh post-realbuild'

This needs the --pre-realbuild-commands and --post-realbuild-commands to exist which can be added to sbuild by applying 0001-add-pre-realbuild-commands-and-post-realbuild-comman.patch to it.

Any unused dependencies can then be found by investigating the file unneededdepends.list.

Bugs: when investigating which build dependencies are unused, virtual packages are not taken into account.