Package: debhelper Version: 12.2.2 Severity: wishlist Hi Niels,
I've noticed myself writing the following debian/rules pattern more than once: ifneq (,$(filter somepackage,$(shell dh_listpackages))) somecommand endif For dh_* commands this can be improved to dh_foo -psomepackage ... because debhelper automatically skips the invocation when somepackage is not build. This is a great feature. In a similar vein, one can pass -a or -i to turn dh_* commands into noops. I think this concept is worth extending. We conditionalize debian/rules using override_*-arch and override_*-indep already, but in the presence of build profiles, this often proves insufficient. The package selection provided by -p, -a and -i helps for dh_* commands, but does not work for others. How about adding a "dh_do" helper whose sole purpose is to conditionalize other commands? dh_do -psomepackage -- some shell command relevant to somepackage This is a powerful feature with potential to abuse. If you don't like it, please close this bug as wontfix. Helmut