Here and now at work, I have to do stuff under windows (obviously, we want elisa to work under windows). On the machine I have at work, that means Vista Home in Spanish (that's what was installed). To do that stuff, I need some tools, like the excellent bzr, written in python (this detail has its importance). A while ago, for some reason, I wanted to use bzr-svn on that setup, so I installed it in C:\Program Files\bazaar\plugins. I don't remember if I managed to make it work or not (did I say it was a while ago?), but I eventually uninstalled it, as well as any dependency that I might have installed for the occasion. Ever since that day, whenever I ran a bzr command, I had the following output preceding the expected output of said command: No Python bindings for Subversion installed. See the bzr-svn README for details. Unable to load plugin u'bzr_svn' from u'C:/Program Files/Bazaar/plugins' Even though I don't have any bzr_svn plugin in that directory! Yes, I tripled checked! This had been driving me crazy for months now, and today, by pure chance, I stepped across a directory called C:\Users\guijemont\AppData\Local\VirtualStore that contained a Program Files directory. Having a look at it, I discovered, after months of struggling with that awful and undeserved error message that there was a: C:\Users\guijemont\AppData\Local\VirtualStore\Program Files\bazaar\plugins\bzr_svn Yeah, really. And it was full of .pyc files. What happened is that, whenever a user program tries to write somewhere where it shouldn't (such as Program Files), UAC gives it the impression that it succeeded, and write the stuff in that VirtualStore instead of the real place. That is a convenience that might save the day to some programs that don't behave and write in places where they shouldn't. Enters python. Python writes .pyc files, which are slightly compressed versions of the original .py files (and therefore faster to load). It writes them in the directory where the .py file resides (I guess it makes a lot of things easier to manage). Then you mix both. Install bzr-svn, use it as a normal user, remove it: it's not removed! Because the .pyc files are still there, hidden in VirtualStore. And they say that OS is user-friendly? As I user, I find it friendly that a directory is deleted when I delete it...

No comment

Post a comment

All comments are held for moderation; basic HTML formatting accepted.

Name: (required)
E-mail: (required, not published)
Website: (optional)


13 November 2008