How did you add support for the buspirate to the Arduino IDE? I don't think it's supported out of the box. In Arduino version 1.5.x, the -D option is not passed by default to external programmers defined in `programmers.txt`, so it's likely that this is a problem in the way you added support for the buspirate to the IDE (or perhaps a problem in the IDE, if you use version 1.0.x, which hardcodes more paths and options IIRC).

In any case, I think that running avrdude with -D and without -e is intended to not do an erase, meaning you can only change bits from 1 to 0, not vice versa. If you're trying to flash in a new program, this is expected to break...

If using the buspirate support on avrdude 6.1 (and 5.5 also tested), the flash gets corrupted the second time it is used with arduino IDE (the first time always ends with success).

The only workaround is to use avrdude with the "-e" switch (or without "-D" to avoid automatic flash erasure). The MCU is then correctly flashed every time, but the RESET support is gone. This is the expected behaviour, since erasing the flash also erases the bootloader and the RESET support.