Archive

Archive for September, 2009

Trac-BZR: installing on Ubuntu/Debian

September 15th, 2009 admin No comments

A project I’m working on recently switched from Subversion (SVN) to Bazaar (BZR) for its Version Control System (VCS). Of the many things we didn’t like about Subversion (merging, line-ending conflicts, etc..), there were some things we’d grown to like, primarily the mature 3rd party ecosystem and its bread-winner Trac.Thankfully there are projects to extend Trac’s reach to other VCSs.

Of interest to me was trac-bzr. Since Bazzar has the power of Canonical behind it, a cursory glance at the “universe” repository shows a package named “trac-bzr”. However a closer look reveals that this package is quite outdated:

>apt-cache show trac-bzr
Package: trac-bzr
Priority: optional
Section: universe/python
Installed-Size: 156
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Original-Maintainer: Chris Lamb <chris@chris-lamb.co.uk>
Architecture: all
Version: 0.2+bzr31-3
...

This seemed like a bad idea, seeing as the main branch was already at r69.

Here are the instructions on installing the latest version:

1. Make sure you have bzr installed

sudo apt-get install bzr

2. Get the latest version of trac

sudo apt-get install trac

3. Get the latest version of trac-bzr, and put it in a revisioned directory.

bzr export ./trac-bzr-r`bzr revno lp:trac-bzr` lp:trac-bzr

4. Install the plugin

cd trac-bzr-r*
python setup.py install

5. Configure trac to use the plugin as described in the trac-bzr README

Categories: System Admin, Ubuntu Tags:

Prevent Symfony from ‘formatting’ request parameters

September 15th, 2009 admin No comments

I’ve been using Symfony for 2 years and I always though their formatting of routes was really cool. For example, if you want to generate a link to a specific action, you’d do something like this:

<?php
echo link_to('Name of Link', '@route_to_action?param1=value1&param2=value2');

And it would generate something like this:

<a href="/module/action/param1/value1/param2/value2">Name of Link</a>

However, for the first time, I found myself NOT wanting this behavior. I wanted:

<a href="/module/action?param1=value1&param2=value2">Name of Link</a>

I looked high and low, on and off for a few days. I finally found something in the forums, with a note saying it should be in the documentation, but isn’t.

<?php
echo link_to('Name of Link', '@route_to_action', array('query_string' => 'param1=value1&param2=value2');
64670 be
Categories: Symfony Tags:

Getting keyboard volume control working in KDE

September 4th, 2009 admin No comments

I recently switched from Gnome to KDE. One thing I noticed was the my volume up / volume down keys stopped working. The on-screen volume meter showed up, and reflected changes when I hit volume up or down, but it wasn’t changing my sound.

If I had kmixer open, I could see that the keys were manipulating the PCM channel, not the Master or Front channels. A Google search later turned up a ticket on Launchpad. Turns out all you need to do is right click on the volume icon in the system tray and select “Select Master Channel…”.

For me, “PCM” was selected. I changed it to “Master” and viola

Categories: Ubuntu Tags: