Archive for October, 2005

Unbreaking Metacity’s constraints.c

Tuesday, October 18th, 2005

So, Havoc has for a long time made comments about constraints.c and mentioned how it was busted, broken, wrong and complicated…among many
other
similar comments. It’s even to the point that he has said he may have too much inertia to review patches against it (not that I can blame him…), and that he wants it to be rewritten (again).

I was naive enough to try to tackle this. I had been eyeing it for quite some time, slowly trying to understand how everything worked. Then I started working pretty hard on this task. Then I thought I had everything finally figured out, had a fair amount of code written that I could use, and a good roadmap with the necessary ideas to get it all done pretty quickly. So much for quickly…

Anyway, things are finally starting to come together and the code has at long last reached a stage where it can be used as a demo (in other words, it really sucks to try to use it for normal work but if you avoid the known nasty regressions and brokenness, you can show off some of the smooth bugfixes). But I believe things are in pretty good shape and this new framework is easier to understand and update (though I’ll need others to chime in to measure whether that’s really true or not).

Anyway, it should be exciting. I’m hoping to get it good enough to merge onto HEAD in the next couple weeks so that I can help out Olav with bugzilla as I’ve been promising to do. Stay tuned…

Updating copyright information

Saturday, October 8th, 2005

A while ago Havoc pointed out that I needed to put my copyright name/date at the top of files to which I’ve made “nontrivial” additions or modifications. Sounded like a bit of a pain; he suggested that it wasn’t urgent and it might be something I could do as I made future changes as that would probably eventually get it all covered. I thought that sounded good–but now that it has been a while I now realize that this course of action just means I continue to forget. So, I made a little script to search for files potentially missing my copyright information.

The script gets some false positives (e.g. trivial changes, plus sometimes I may have just been moving a function someone else wrote to a different file, and I’ve committed many patches for other people), and it may also miss some changes (if someone else committed a patch I wrote), but overall I found it pretty helpful in narrowing down which files to look at. It was as simple as running:

$ ./find-cvsuser-modifications.sh --missing-copyright "Elijah Newren" newren

I could also add –print-changes to get a couple of the log entries (well, truncated versions), which helps rule some of the changes out.

Now, if only it could check the actual changes and determine whether they are “non-trivial” and whether the changes were actually made by me instead of just committed by me…

Building Gnome from tarballs with jhbuild

Tuesday, October 4th, 2005

So, I’ve been meaning to put these steps up online somewhere (besides release-team mailing list archives). I figured my blog was a good temporary place, at least. So, the instructions for gnome-2.12.0 would be:

  1. Make sure you have the necessary pre-requisite packages
  2. http://live.gnome.org/JhbuildDependencies may come in handy here. Note that it is okay to wait until you run into an error and then install the necessary package to avoid it, but it sometimes saves some headache to do it up front.

  3. Download jhbuild (Note: just hit enter when asked for the password)
  4.  $ mkdir -p ~/cvs/gnome2
     $ cd ~/cvs/gnome2
     $ cvs -d :pserver:anonymous anoncvs gnome org:/cvs/gnome login
     Logging in to :pserver:anonymous anoncvs gnome org:/cvs/gnome
     CVS password: 
     $ cvs -d :pserver:anonymous anoncvs gnome org:/cvs/gnome checkout jhbuild
    
  5. Install jhbuild
  6.  $ cd jhbuild
     $ make install
    
  7. Create your ~/.jhbuildrc (or copy it from elsewhere)
  8.  $ cd ~/
     $ wget http://ftp.gnome.org/pub/GNOME/teams/releng/2.12.0/sample-tarball.jhbuildrc
     $ mv sample-tarball.jhbuildrc .jhbuildrc
    
  9. Build it
  10.  $ jhbuild bootstrap
     $ jhbuild -m http://ftp.gnome.org/pub/GNOME/teams/releng/2.12.0/gnome-2.12.0.modules build
    

For other versions (greater than or equal to 2.12.0 since we didn’t start saving jhbuild modulesets until then, and didn’t start making them until much before then), just update the URLs accordingly. :-) Note that ‘jhbuild -m list -r’ can also be handy for finding out what version numbers occur in a given release.