Bug#840094: blends-dev: Does not recognize multiline dependencies
Hi Andreas,
On 09.11.2016 12:47, Andreas Tille wrote:
> In other words: Once it was defined as syntax for these control files
> that newlines need to be escaped. I do not like it and as I said this
> is fixed in the long-term pending rewrite. However, the bug is not
> serious but at best wishlist. Would you follow this arguing?
>
Not really. My point here is that this happens really unexpected, and
since blend-gen-control doesn't complain about the then wrong format,
one silently gets wrong dependencies. At least I did in the first
versions of debian-astro (<0.5).
We have a clear definition of how these files should look like, namely
RFC822, and this also defines continuation lines. Look at
https://blends.debian.org/blends/ch08.html#edittasksfiles - it is
blends-gen-control that isn't conform to that.
I would think that there is also a quick fix for it -- the tool already
handles continuation lines for the tasks description, so one could
probably just take that. I have no glue of all the Perl $@^!~ special
chars, but wouldn't do it something like the attached patch (after
removing the obvious errors from it)?
Or something else just adopted from lines 556-562 of blends-gen-control?
Best regards
Ole
diff --git a/devtools/blend-gen-control b/devtools/blend-gen-control
index 1aba552..cde3237 100755
--- a/devtools/blend-gen-control
+++ b/devtools/blend-gen-control
@@ -566,9 +566,14 @@ sub load_task {
my $header;
for $header (qw(Depends Recommends Suggests)) {
if (m/^$header:\s+(.+)$/ && $1 !~ /^\s*$/) {
+ my $pkgs = $1;
+ while (<TASKFILE>) {
+ last if (m/^\S+/ || m/^\s*$/);
+ $pkgs .= $_;
+ }
$taskinfo{$curpkg}{$header} = ()
if (! exists $taskinfo{$curpkg}{$header});
- my ($pkglist, $missinglist) = process_pkglist($1);
+ my ($pkglist, $missinglist) = process_pkglist($pkgs);
push(@{$taskinfo{$curpkg}{$header}}, @{$pkglist});
$haspackages += $#{$taskinfo{$curpkg}{$header}} + 1;
Reply to: