how to do a pbuilder-dist build with dependencies in a ppa?

I'm trying to build a package for my ppa that uses packages from two other ppas. I want to do a test build using pbuilder-dist. I have done this before and I know that I need a combination of:

  • OTHERMIRROR in ~/.pbuilderrc
  • --override-config, but I'm not sure when to add it to the pbuilder-dist call
  • pbuilder-dist raring update and pbuilder-dist raring build <pkg>.dsc
  • maybe other things?

Can someone give a detailed description? I have tried different combinations, but nothing seems to work.

The two ppas I need are ppa:gnome3-team/gnome3 and ppa:tkluck/gnome3. Thanks!


I'm using pbuilder with an enhanced config and not pbuilder-dist but the steps should be basically the same:

  1. Add your extra sources to the OTHERMIRROR variable in your ~/.pbuilderrc:

    OTHERMIRROR="deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu raring main|deb http://ppa.launchpad.net/tkluck/gnome3/ubuntu raring main"
    
  2. Chroot into your pbuilder environment to add the repository keys (or alternatively create a local keyring with those two keys and add it to APTKEYSTRINGS variable or add your local /etc/apt/trusted.gpg keyring):

    pbuilder-dist raring login --save-after-login
    apt-key adv --keyserver pgp.mit.edu --recv-keys 3B1510FD 568F2AD3
    exit
    

    (Of course you can extend your sources.list directly and skip step 1 and 3 but an pbuilder-dist update will reset the sources.list.)

  3. Update your pbuilder environment (with plain pbuilder you have to add --override-config):

    pbuilder-dist raring update --release-only
    

    Note: Since raring a development release has the proposed sources enabled as default. This is done by passing the proposed sources to pbuilder's --othermirror command line option - which overwrites the config file value. So you have to use the --release-only switch.

  4. Build your package:

    pbuilder-dist raring build YOURPACKAGE.dsc
    

You can also create a Dsomething file stating the repository you want to add. If you have HOOKDIR="${HOME}/.pbuilder-hooks/" in your ~/.pbuilderrc, then a file called $HOME/.pbuilder-hooks/D10addppa could exist with the following content:

#!/bin/sh

echo "deb deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu raring main" >> /etc/apt/sources.list
echo "deb http://ppa.launchpad.net/tkluck/gnome3/ubuntu raring main"  >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B1510FD 568F2AD3
apt-get update

This method also keeps the PPA changes temporal.