Sean Whitton writes ("Bug#857316: dgit: please make --build-products-dir 
configurable"):
> On Thu 09 Mar 2017 at 11:58PM +0100, Mattia Rizzolo wrote:
> > I build my packages with pbuilder, and it is set up to put the results
> > in ~/pbuilder/results/$distribution/$architecture/.  I'd like dgit to go
> > look for the .changes to upload there, and I currently accomplish that
> > by passing `--build-products-dir ~/pbuilder/result/sid/amd64` to
> > `dgit push`.  I'd like to configure that statically, so I don't have to
> > keep specifying it.
> 
> Here are patches implementing this.

Thanks.


Why does the setting of $buildproductsdir need to be done in
build_or_push_prep_early, before pushing or notpushing ?  I guess it
wouldn't make sense to have different settings, but the business with
localising $access_forpush is a wrinkle which is best avoided where
possible.

So I think it might be better to introduce build_or_push_prep,
which I guess would be called in prep_push after pushing and in
build_prep after build_prep_early.


Style: I normally spell:

+        my $bpd_from_cfg = access_cfg('build-products-dir', 'RETURN-UNDEF');
+        $buildproductsdir = $bpd_from_cfg // '..';

like this:

+        $buildproductsdir = access_cfg('build-products-dir', 'RETURN-UNDEF') 
// '..';

And then,

+    if (!defined $buildproductsdir) {
*        $buildproductsdir = access_cfg('build-products-dir', 'RETURN-UNDEF') 
// '..';
+    }

could be spelled

*    $buildproductsdir //= access_cfg('build-products-dir', 'RETURN-UNDEF') // 
'..';

or

*    $buildproductsdir //= access_cfg('build-products-dir', 'RETURN-UNDEF');
*    $buildproductsdir //= '..';


I don't much like the new test case because it's a whole new test case
just for this.  I think it would be better to add the configuration
option for a cross-section of existing tests.

Probably, that would be,
 * introduce a new  t-buildproductsdir-config  subroutine
 * add it to the top of a selection of existing tests

Do you want me to do that ?


Thanks,
Ian.

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to