Hi Chris,

On Sat, Jul 6, 2019 at 7:21 PM Chris Lamb <la...@debian.org> wrote:
>
> The following "fixes" it:
>
> diff --git a/collection/md5sums b/collection/md5sums
> index 970eb0656..e8006ab10 100755
> --- a/collection/md5sums
> +++ b/collection/md5sums
> @@ -53,7 +53,8 @@ sub collect {
>
>      foreach my $file ($info->sorted_index) {
>          next unless $file->is_file;
> +        $file =~ s,\\n,\n,g;
>          printf {$opts{pipe_in}} "%s\0", $file;
>      }
>
>      close($opts{pipe_in});
> diff --git a/lib/Lintian/Path.pm b/lib/Lintian/Path.pm
> index 108a18ede..fb8048ed5 100644
> --- a/lib/Lintian/Path.pm
> +++ b/lib/Lintian/Path.pm
> @@ -643,6 +643,7 @@ sub open {
>      $layer //= '';
>      my $opener = sub {
>          use autodie qw(open);
> +        $_[0] =~ s,\\n,\n,g;
>          open(my $fd, "<${layer}", $_[0]);
>          return $fd;
>      };
>
> … but this is clearly hacking around the problem and is likely
> incomplete. Storing the newline literally in the internal structure
> breaks other things that I can't immediately see/fix.

I agree. I rewrote the collections using IO::Async (coming once buster
is out) and can look at the newline issue over the next few days, if
you are okay with that.

Kind regards,
Felix

Reply via email to