Bug#1015913: /usr/share/perl5/Config/Model/models/Dpkg/Control.pl: failure applying Dpkg::Control fixes when current directory is single character
Dominique Dumont
domi.dumont at free.fr
Mon Jul 25 09:19:18 BST 2022
Hi
On Saturday, 23 July 2022 20:31:40 CEST you wrote:
> Configuration item 'source Source' has a wrong value:
> computed value error:
> value '1' does not match regexp \w[\w+\-\.]{1,}
> value is computed from 'use Cwd; getcwd =~ m!/([^/]+)$!; $1;'
Right. This is one case where cme tries to be too smart.
The Source parameter is set up to have $PWD as default value [1] and the value
is checked to match a name with more than one char [2].
> In the real case the root_dir argument points to an existing package
> directory containing 'debian/control' and all, e.g:
>
> $ sudo apt install dh-make-perl
> $ mkdir -p ~/tmp/1
> $ cd ~/tmp/1
> $ dh-make-perl --cpan Alias
But this default value does not makes sense. I guess I can tweak the formula
l30 to return undef when the match regex (L35) cannot be satisfied. Then user
must manually set the Source value before saving because this value is
mandatory (L34)
> I hope this is enough to reproduce and diagnose the problem.
Sure, thanks for the boiled down step. This will go in the non reg test suite
;-)
All the best
[1] https://salsa.debian.org/perl-team/modules/packages/libconfig-model-dpkg-perl/-/blob/master/lib/Config/Model/models/Dpkg/Control/Source.pl#L28
[2] https://salsa.debian.org/perl-team/modules/packages/libconfig-model-dpkg-perl/-/blob/master/lib/Config/Model/models/Dpkg/Control/Source.pl#L35
More information about the pkg-perl-maintainers
mailing list