Robert Bihlmeyer wrote: > Could dh_clean be extended to trap not-allowed-to-remove errors and > issue a helpful message similar to dh_testroot? Then dh_testroot could > be removed from the clean target, and it would just work for the most > common cases, and give good diagnostic for common mistakes.
Of course you can remove the dh_testroot. Most of the time, that just means your clean rule will run until it finds some file owned by root that it cannot remove, and then it should die with an error of its own, right? The dh_clean is thus sort of an optimization, plus a way of not having to make sure that your code does the right thing if it encounters a file owned by root that it cannot remove (after all, it might not be properly set -e or it might have an idepotency problem, or something). > Us lazy people would like to save 9 letters on the clean call, and of > course we're far too far in sloth as to > alias dcln='fakeroot debian/rules clean' I can't recall the last time I ran debian/rules clean by hand. I use dpkg-buildpackage -tc (well, actually, I use "build", which runs that and does many other useful things). -- see shy jo