Package: diffoscope
Version: 45
Severity: normal

Dear Maintainer,

When comparing directories that contain broken symlinks, e.g. by the following
steps:

mkdir a
mkdir b
cd a
ln -s 1 link
cd ..
cd b
ln -s 2 link
cd
diffoscope a b

...diffoscope crashes with a Python exception when attempting to open the file
pointed by the symlink:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/diffoscope/__main__.py", line 177, in 
main
    sys.exit(run_diffoscope(parsed_args))
  File "/usr/lib/python3/dist-packages/diffoscope/__main__.py", line 148, in 
run_diffoscope
    parsed_args.file1, parsed_args.file2)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", 
line 90, in compare_root_paths
    return compare_directories(path1, path2)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", 
line 100, in compare_directories
    return FilesystemDirectory(path1).compare(FilesystemDirectory(path2))
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", 
line 147, in compare
    my_file, other_file, source=name)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", 
line 98, in compare_files
    if file1.has_same_content_as(file2):
  File "/usr/lib/python3/dist-packages/diffoscope/__init__.py", line 137, in 
tool_check
    return original_function(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 
178, in has_same_content_as
    my_size = os.path.getsize(self.path)
  File "/usr/lib/python3.5/genericpath.py", line 50, in getsize
    return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: 'a/link'

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/6 CPU cores)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect
(Debian in a chroot)

Versions of packages diffoscope depends on:
ii  python3-libarchive-c   2.1-3
ii  python3-magic          1:5.25-2
ii  python3-pkg-resources  18.8-1
pn  python3:any            <none>

Versions of packages diffoscope recommends:
ii  acl                        2.2.52-2
ii  binutils-multiarch         2.25.90.20160101-2
ii  bzip2                      1.0.6-8
ii  caca-utils                 0.99.beta19-2+b1
ii  cpio                       2.11+dfsg-4.1
ii  default-jdk [java-sdk]     2:1.7-52.1
ii  enjarify                   20151118-1
ii  fontforge-extras           0.3-4
ii  fp-utils                   2.6.4+dfsg-8
ii  fp-utils-2.6.4 [fp-utils]  2.6.4+dfsg-8
ii  genisoimage                9:1.1.11-3
ii  gettext                    0.19.7-2
ii  ghc                        7.10.3-5
ii  gnupg                      1.4.20-1
ii  mono-utils                 4.2.1.102+dfsg2-5
ii  openjdk-7-jdk [java-sdk]   7u91-2.6.3-3
ii  pdftk                      2.02-3
ii  poppler-utils              0.38.0-2
ii  python3-debian             0.1.27
ii  python3-guestfs            1:1.32.0-2
ii  python3-rpm                4.12.0.1+dfsg1-3+b1
ii  python3-tlsh               3.4.1+20151014-1
ii  rpm2cpio                   4.12.0.1+dfsg1-3+b1
ii  sng                        1.0.6-3
ii  sqlite3                    3.10.0-1
ii  squashfs-tools             1:4.3-3
ii  unzip                      6.0-20
ii  vim-common                 2:7.4.963-1+b1
ii  xz-utils                   5.1.1alpha+20120614-2.1

Versions of packages diffoscope suggests:
pn  libjs-jquery  <none>

-- debconf information excluded

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to