Review of --mode branch

Loïc Minier lool at dooz.org
Fri Jan 8 23:33:18 UTC 2010


        Hey

 (I'm moving this to the pbuilder mailing-list instead of the bug since
 it's more of a generic work which IMO allows closing a very large
 number of bugs/requests).

 Generally, I'd prefer the name "profiles" instead of modes because I
 find the latter a bit confusing.

 pbuilderrc: you change vars like:
-BASETGZ=/var/cache/pbuilder/base.tgz
+BASETGZ=/var/cache/pbuilder/${PBMODE}/base.tgz

 You could use ${PBMODE:+$PBMODE/} instead to avoid the extra slash.

 pbuilderrc.5: perhaps we should simply leave the absolute defaults
 documented and mention that this is changed when using --mode; e.g
 instead of:
  -.BI "BUILDRESULT=" "/var/cache/pbuilder/result/"
  +.BI "BUILDRESULT=" "/var/cache/pbuilder/${PBMODE}/result/"
   Specify the default directory which the build result will
   be copied over to after the building.

 We could keep:
   .BI "BUILDRESULT=" "/var/cache/pbuilder/result/"
 and add a section on modes which says:
   When using --mode, some defaults settings will be adjusted such as
   BUILDRESULT, APTCACHE, ...; you may still override these in the usual
   ways.
 (just as in pbuilder.8)

 pbuilder.8:
    -.BI "pbuilder --create [" "options" "]"
    +.BI "pbuilder [--mode pbmode] --create [" "options" "]"
 don't think you actually need to mention that here; just mention the
 flag later.  We can mention the new feature in the debian/NEWS to get
 some attention.

 pbuilder:
    +# pbuilder mode option: Osamu Aoki <osamu at debian.org> 2009 Dec 31
 no need to mention you changed that, it will be recorded by git ("git
 blame pbuilder").

 pbuilder/pbuilderrc: I think the flag should be shorter because it will
 be used frequently; how about "-m" for mode, or "-p" for profile?


 So if you check my initial proposal, I propose *recording* more things
 in the mode / profile: the target distribution for instance.  I think
 that "pbuilder -p foo create --distribution squeeze" should create a
 foo.pbuilderrc which sets DISTRIBUTION=squeeze so that subsequent
 commands keep using that (or --mirror, etc.).  What do you think of
 this part?  Is this something you would be interested in implementing?
 Or if you have no interest, would you mind if I did it?


 Another high level comment is with the first commit message: instead of
 "Osamu's branch to enable mode support" in the first line, you might
 want to just state "Add mode support" or something similar.  Also, you
 could name your branch "mode-support".  I'm happy to help fixing the
 commit message or branch name if you like.

   Thanks!
-- 
Loïc Minier



More information about the Pbuilder-maint mailing list