Bug#252584: Bug #252584
I recently saw the same problem (packages scripts failing with exit
status 127) and found the following (inexplicable) workaround - use dash
for /bin/sh instead of bash... Don't know if that is a general solution
or I just got lucky, but I thought I'd pass it along.