Wading upstream
So I want to start making an effort to share more of the little tips, tricks, and scripts that I use in the course of Ubuntu development. Hopefully someone will find this stuff useful. On the other hand, I also hope someone will come along, look at what I use, and point out just how wrong it is and show me something simpler.
To start off with, here’s a function from my ~/.bashrc file. Gmail has an unfortunate insistence on forcing line breaks. This can be an issue when working with the Debian BTS as you need to interact with the control server through one line commands sent via email. The place where this is always the most painful for me has been in marking bugs as forwarded upstream. So I figured I’d make my life easier by just doing it on the command line:
function bts-forward () {
if [[ "$1" == ${1//[^0-9]/} && "$2" == http* ]]; then
echo "forwarded $1 $2" | \
sendmail -f"$DEBEMAIL" control@bugs.debian.org;
else
echo "Usage: bts-forward DEBIAN_BUG UPSTREAM_URL"
fi
}





There’s bts(1) present in the devscripts package for that. Rather than bts-forward, it would be “bts forward 12345 http://blahblahblah“. It also works for pretty much every other control@bugs.debian.org command as well. I personally use the manpage as an offline bugs.debian.org reference.
hyperair
November 12, 2011 at 6:16 pm
Well there you go. I guess we’ll just file this one under “someone will come along, look at what I use, and point out just how wrong it is and show me something simpler.”
Thanks!
andrewsomething
November 12, 2011 at 6:22 pm