Comment 10 for bug 1004579

Revision history for this message
Andrew Bate (andrewdbate) wrote (last edit ):

Adding to my previous comment, I can also see that the documentation is wrong.

The page https://wiki.ubuntu.com/PbuilderHowto#Differences_with_pbuilder says that:

[QUOTE]
pbuilder-dist does apparently not yet support all kinds of operations. The following doesn't work correctly for example:

sudo pbuilder-dist eoan i386 update --override-config --othermirror "deb http://ppa.launchpad.net/cae-team/ppa/ubuntu eoan main"

So if you want to add a repository, you will have to use "OTHERMIRROR" in ~/.pbuilderrc as follows:

OTHERMIRROR="deb http://ppa.launchpad.net/cae-team/ppa/ubuntu eoan main"
[/QUOTE]

But adding OTHERMIRROR to ~/.pbuilderrc has no effect, as was originally reported.

Basic tracing shows that this is still the case in focal (20.04).

My workaround has been to add a hook directory ~/.pbuilderrc by adding the line:
HOOKDIR="$HOME/.pbuilder-hooks/"

Then in $HOME/.pbuilder-hooks/ create a file D10addsource which contains the lines:
echo "deb [your-source-here]" >> /etc/apt/sources.list
apt-get update

However, if setting OTHERMIRROR inside of ~/.pbuilderrc worked as documented, then all I would have needed to do would be to add the following line to ~/.pbuilderrc and no hook required:
OTHERMIRROR="deb [your-source-here]"

If my workaround is wrong, please tell me.

So in summary, this bug still exists. If the bug is not going to be fixed, then at least the documentation needs to be updated.

This bug is somewhat related to https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/371221, because if packages from ~/pbuilder/dist_result could satisfy dependencies then I wouldn't need to use OTHERMIRROR. But really OTHERMIRROR should still work regardless.