Sun, 28 Dec 2008

come ti italianizzo la storia

ieri (27/12) alle 13 si guardava il tg2 (vabbe', comunque il video e' disponibile su raiclick) e c'era la notizia del medico californiano che usava il grasso della liposuzione umana per farci del carburante (circa minuto 27 del video), la notizia su corriere.it.
Il tg2 chiosa con "(il medico scappa in sudamerica) finalmente LONTANO DALLA MAGISTRATURA della california" (l'enfasi e' mia), in buona fede uno potrebbe pensare che si italianizza un po' la storia e vabbe', in mala fede invece si potrebbe pensare che il messaggio da far passare e' "uno infrange la legge, la magistratura indaga dunque e' colpa della magistratura".
Fa inoltre un po' strano guardare il tg sul computer, c'e' il rischio di rendersi conto di cosa dicono.

Posted at: 12:01 | permalink permalink | add to del.icio.us add to del.icio.us | comments Comments (0)

Sat, 13 Dec 2008

don't exit bash on /etc with uncommitted changes

As explained before by Zack, it might happen that you co-administer a machine and have /etc under some VCS (which you should anyway by using etckeeper).
There are a few problems like detecting the identity of the committer and don't leave /etc with uncommitted changes so I recently came up with a slighly different solution than the one we thought two years ago (besides switching from bzr to git).
Take committer name/email from ~/.gitconfig of the user owning the tty or GIT_CONFIG or GIT_CONFIG_LOCAL if they are set.
Trap a function on shell's EXIT rather than loop on .bash_logout which applies only to login shell.
The resulting code to be put in /root/.bashrc:


git_functions="/path/to/git-etc-common"

# export GIT_* variables
if [ -f "$git_functions" ]; then
. "$git_functions"
git_export_env
fi

case $- in
*i*) # interactive shell
check_uncommitted(){
if [ -f "$git_functions" ]; then
. "$git_functions"
if ! git_etc_status; then
echo "Uncommitted changes to /etc found, please commit them"
bash -$-
fi
fi
}
trap check_uncommitted EXIT
;;
esac

Where git-etc-common is to be found here.

Posted at: 12:28 | permalink permalink | add to del.icio.us add to del.icio.us | comments Comments (1)

Wed, 10 Dec 2008

RSSes for NEW available on ftp-master

The two RSS feeds previously at http://people.debian.org/~filippo/NEW_rss/ have been moved to a more proper location on ftp-master and the script (tools/queue_rss.py) merged into dak thanks to ganneff.

JFTR the script scans a directory with .changes files (which happens to be NEW in this case) and generates the said feeds, it is not tied to ftp-master and requires python-pyrss2gen and python-debian.

Posted at: 22:06 | permalink permalink | add to del.icio.us add to del.icio.us | comments Comments (0)