pbuilder-apt-config
Loïc Minier
lool at dooz.org
Tue Jan 26 15:11:03 UTC 2010
On Tue, Jan 26, 2010, Osamu Aoki wrote:
> In short, it is moving right direction. You have covered all required
> archives. (It was bad idea of me to include archive.debian.org in my script.)
Oh I didn't mind, actually. It wasn't needed for *pbuilder* but since
I felt I was writing a reusable tool, there is no problem in supporting
more archives. I don't think there is a single tool able to dump APT
config for various archives, tools usually repeat that information.
e.g. virtual machine creation tools, chroot creation tools, pbuilder...
or expect the user to enter everything.
> 1. how do we separate data from script?
> issue: data = URL, distribution name
> my pbuilderrc like approach makes hard to read
> case ... esac etc.
> answer1: Make /etc/pbuilder/pbuilder-apt-config override
> /usr/lib/pbuilder-apt-config
> answer2: Use ugly eval "case ...esac" and set key parametres in
> pbuilderrc
It might be that we allow people to write their own pbuilder-apt-config
(just like you can configure which pbuilder-satisfydepends gets run),
but ideally we would allow some kind of extensible architecture. I
have no idea on how to do this right now.
> 2. how do we respect user's choice of Debian archive.
> answer: Creation of DEBIAN_MIRROR as I did and use of it in
> pbuilder-apt-config etc. (Read below for additional
> thoughts)
Concerning URLs, I'll add a facility to set the mirror URL of a
particular archive.
I personally think it will be maintained in some kind of
/etc/pbuilder/mirror-map.conf file which would have something like:
bpo: www.backports.org
debian: http://ftp.de.debian.org
ubuntu-ports: http://mirror.local/ubuntu-ports/
etc.
Just didn't come to it yet.
> I see. I have no problem using target archive "profile" in
> pbuilder-apt-config as long as pbuilder uses dfferent name for the local
> chroot "profle". Confusing terminology is bad for the user.
Ack; I think it will be essentially hidden from the user by default;
when he creates a pbuilder environment with --distribution or
--profile, one or the other will be passed to pbuilder-apt-config
--profile.
> > Would you mind having a look at the test cases + tool I've now updated?
>
> One thing I noticed: this is your code and coding style is quite
> different from the rest of pbuilder. quite readable.
Oh thanks; that's my usual shell style, but for pbuilder I try to match
capitalization and indentation rules. This is something hard to change
in a project like pbuilder since it creates a huge diff and the project
is an inconsistend style while we change the style. :-/
> > It allows:
> > ./pbuilder-apt-config --profile experimental apt-sources
> ...
> > And some more (see test_pbuilder-apt-config and ./pbuilder-apt-config
> > --help).
>
> You may think about <action> debootstrap-component to be complete.
I think you always debootstrap with the default components. If the
user ever needs to override the components which debootstrap should
use, the user will actually set which components to use, so we can use
that. I implemented "suite" because some suites are aliases which
can't be debootstraped (e.g. testing or unstable) and some are not
debootstrapable at all (e.g. experimental) so you need to map them to a
suite + mirror.
> That spits out list of component with "debootstrap-component=all"
> Debian: "main contrib non-free"
> Ubuntu: "main restricted universe multiverse"
>
> with "debootstrap-component=1"
> Debian: "main"
> Ubuntu: "main"
Ok; that doesn't seem specific to debootstrap but we could add a
facility to get/retrieve all components of a suite.
> > I'm thinking a bit more about a nice mirror map interface.
>
> debconf generates DEBIAN_MIRROR (instead of MIRROR) in my
> debian/pbuilder.config
>
> I wonder how it fits into Ubuntu version. Maybe I should have done as
> HOST_MIRROR and HOST_TYPE. Then overriding it becomes generic.
Yeah; I'm not too sure about the Debconf stuff. I would actually
prefer if we had none to take care of. It will be quite a lot of work
to allow setting the mirror for a bunch of archives over Debconf.
The Debconf stuff is going to be a hard transition!
--
Loïc Minier
More information about the Pbuilder-maint
mailing list