February 21st, 2010
Today I finally found the reason why the table in reportbug-ng was not always sorted correctly. The fix was trivial and I’m happy it’s finally corrected. As announced last week, reportbug-ng now also can optionally hide closed bugs, which makes reportbug-ng together with the complex queries a great tool for finding easy NMU candidates.
To play around with those new features, I also did 5 lazy NMUs today. Most of them where fixes for FTBFS/RC bugs which had already a patch in the BTS.
Tags: debian, reportbug-ng, squeeze
Posted in Uncategorized | No Comments »
February 18th, 2010
Until today you could only use reportbug-ng to query the BTS with simple queries like “packagename”, “bugnumber”, “tag:patch”, etc. But the BTS actually supports composite queries like “severity:grave tag:patch” which returns bugreports with severity grave and a patch. The underlying Python library python-debianbts also supported this right from the start, but reportbug-ng did not make use of it.
Last weekend I finally had the time to fix that and the result is on it’s way to unstable.
Composite queries provide a very convenient way to find cheap NMU candidates: the query "severity:critical severity:grave severity:serious tag:patch" will return release critical bugs which have a patch. Now you can just go through this list, pick an open bug, test the patch and do what’s necessary to release Squeeze in time.
Next item on my list is an option to hide closed bugs, maybe next weekend.
Tags: debian, python-debianbts, reportbug-ng
Posted in Uncategorized | 1 Comment »
February 17th, 2010
If you’re using KDE and upgraded to Thunderbird 3 lately you might have the problem that links in emails don’t open in a browser anymore. For my case that happened even without a user visible error message.
If that sounds familiar for you, check the error console (Tools/Error-Console). If there is an error like:
Error: uncaught exception: [Exception... "Component returned failure
code: 0x80004005 (NS_ERROR_FAILURE)
[nsIExternalProtocolService.loadUrl]” nsresult: “0×80004005
(NS_ERROR_FAILURE)” location: “JS frame ::
chrome://communicator/content/contentAreaClick.js :: openLinkExternally
:: line 188″ data: no]
Then Thunderbird just (silently) fails to launch the browser. Guido pointed me to gconftool. gconftool -R / | grep url-handlers told me that some components of gnome still had Firefox configured as http-handler (which is strange since it was rebranded to iceweasel ages ago). Resetting them solved the problem for me.
The sad part of the story: x-www-browser, sensible-browser and KDE’s http handler where all correctly configured and pointed to iceweasel. All applications behaved correctly only Icedove used a (for me) hidden setting pointing to firefox.
Tags: debian, thunderbird
Posted in Uncategorized | No Comments »
January 27th, 2010
In desperate need to organize my collection of scientific papers, I had a look at various tools which could help me organizing them. Probably one of the best out there is Mendeley. Mendeley seems to be a very good tool to keep your massive collection of pdfs under control. Unfortunately a very basic function, namely looking up a newly imported paper in Google Scholar to get attributes like: Authors, Year, etc. right, is bundled with a Mendeley account. I guess that’s their way of forcing the user to participate to their community stuff, since without the Google Scholar lookup Mendeley is pretty useless unless you want to fill all the attributes manually.
So I decided to write my own tool to make the lookup. Unfortunately Google does not really want to give away that precious data: they don’t provide an API and even block certain User-Agents from accessing the page. Then, there is also the problem of scraping the results page to get the right data.
The first problem can be trivially solved by setting a common User-Agent string, the second one can be elegantly circumvented by using the bibtex files provided in the search results. The bibtex entries are however only showed if you enabled them in the settings, which are stored in a cookie. After a few tries, I figured that the CF attribute (citation format?) controls which bibliography format should be offered in the results page and CF=4 corresponds to bibtex. Generating a fake cookie is easy, but you have to know what must be included. In this case it looks like a 16 digit hex as ID and the CF attribute is sufficient. The ID is probably supposed to be your id, but a randomly generated one also works like a charm.
The resulting cookie looks like this: GSP=ID=762a112b5c765732:CF=4
All you have to do now is to query Google Scholar using the user string and the cookie:
...
# fake google id (looks like it is a 16 elements hex)
google_id = hashlib.md5(str(random.random())).hexdigest()[:16]
GOOGLE_SCHOLAR_URL = “http://scholar.google.com”
HEADERS = {’User-Agent’ : ‘Mozilla/5.0′,
‘Cookie’ : ‘GSP=ID=%s:CF=4′ % google_id }
def query(searchstr):
“”"Return a list of bibtex items.”"”
searchstr = ‘/scholar?q=’+urllib2.quote(searchstr)
url = GOOGLE_SCHOLAR_URL + searchstr
request = urllib2.Request(url, headers=HEADERS)
response = urllib2.urlopen(request)
html = response.read()
# grab the bibtex links
…
And Google Scholar will offer you links to the bibtex files of the results. Getting those links is easy since they all start with "/scholar.bib". Just search for those and download the targets.
The complete code is available on github. It can be used as a python library or a standalone application, you just call it like this: gscolar "some author or title" and it will print the first ten results in bibtex to stdout.
Tags: python
Posted in Uncategorized | 1 Comment »
January 26th, 2010
Dear Lazyweb,
since yesterday’s daily update, my laptop runs really sluggish. Is there a way to list all packages which where updated or installed yesterday to track down the problem?
Tags: debian, lazyweb
Posted in Uncategorized | 16 Comments »
January 9th, 2010
Git bisect, ccache and cowbuilder: a combination made in heaven! Tracking down a commit which introduced an ugly bug with those tools was a breeze.
Git bisect is very useful finding a commit which introduced a bug very quickly, ccache massively reduces compiling time. Compiling icedove (thunderbird) on my laptop using cowbuilder takes roughly 30 minutes. Using cowbuilder with ccache, it only takes 10 minutes, where most of the time is spent setting up the build environment.
Tags: ccache, cowbuilder, debian, git
Posted in Uncategorized | 2 Comments »
January 5th, 2010
One idiot ignites a bomb, others immediately scream for security scanners. Apparently Terrorism works pretty well for countries with increased security needs.
Tags: 1984
Posted in Uncategorized | 1 Comment »
December 8th, 2009
Funny coincidence that David writes how well Linux and Printers go together for 12 years, while it is apparently impossible to print something with CUPS in unstable since a week 
Tags: debian
Posted in Uncategorized | 3 Comments »
December 2nd, 2009
Looking at the sorry state of Python in Debian, makes me wonder if we shouldn’t enforce team maintainance of packages above a certain popularity/importance/whatever threshold. People worked hard in the last months to fix any bugs that would prevent Python2.6 to land in unstable and yet nothing happens. Time passes by and we will eventually end up with Squeeze having a horribly outdated Python version.
Tags: debian, python, squeeze
Posted in Uncategorized | 4 Comments »
November 23rd, 2009
Dear Lazyweb,
do you know how to theme Tk apps? In the default setting, Tk apps running on my KDE4 desktop, cause spontanous eye cancer:

there must be a way to theme them to look like the Qt or at least GTK apps, or not?
Tags: lazyweb
Posted in Uncategorized | 11 Comments »