Comment 7 for bug 1792934

Revision history for this message
Ilya (iva2k) wrote :

I inspected perl code in /usr/bin/debsums...

The logic around catchink symlink loop is a bit flawed. Its in a function resolve_path() and it is only called from method .check() which intends to verify if the file can be opened. Since its goal is to find any bad files, symlink loop should be reported as any other file open errors, and the tool should not die, even if there is a legitimate symlink loop.

So I changed perl code - instead of 'die ...' -> 'return "";', and after 'my $resolved = resolve_path(...) added an if block:

         my $resolved = resolve_path($path,$pack);
+ if ($resolved eq "") {
+ warn "$self: symlink loop - can't open $pack file $root/$path ($@)\n";
+ return 2;
+ }

With that change debsums does not fail on the symlink loops and reports them with all other problem files.

BTW:
openoffice.org-calc package did not have symlink loop, but it linked to a file from uno-libs3 package, which did have a loop, reinstalling uno-libs3 package fixed/removed the loop.