[Reproducible-builds] Bug#818856: Bug#818856: diffoscope: crashes on broken symlinks
Satyam Zode
satyamzode at gmail.com
Sat Apr 2 20:38:52 UTC 2016
Package: diffoscope
Version: 51
Severity: normal
Hi, Pabs!
Please try an attached patch. Hopefully, it'll solve this problem. :)
Thanks!
Satyam Zode
PICT, Pune
On Sun, Apr 3, 2016 at 2:02 AM, Satyam Zode <satyamzode at gmail.com> wrote:
> Hi, Pabs!
>
> Please try an attached patch! Hopefully, it'll solve this problem. :)
>
> Thank you!
> Satyam
> Satyam Zode
> PICT, Pune
>
>
> On Mon, Mar 21, 2016 at 8:02 AM, Paul Wise <pabs at debian.org> wrote:
>> Package: diffoscope
>> Version: 51
>> Severity: normal
>>
>> I found a way to crash diffoscope with broken symlinks:
>>
>> pabs at chianamo ~ $ mkdir foo bar
>> pabs at chianamo ~ $ touch foo/baz
>> pabs at chianamo ~ $ ln -s asdasfahguwbagpiuasbdifgsabdf bar/baz
>> pabs at chianamo ~ $ diffoscope foo bar
>> 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 92, in compare_root_paths
>> return compare_directories(path1, path2)
>> File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 104, in compare_directories
>> return FilesystemDirectory(path1).compare(FilesystemDirectory(path2))
>> File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 157, in compare
>> my_file, other_file, source=name)
>> File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 102, in compare_files
>> if file1.has_same_content_as(file2):
>> File "/usr/lib/python3/dist-packages/diffoscope/__init__.py", line 143, in tool_check
>> return original_function(*args, **kwargs)
>> File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 186, in has_same_content_as
>> other_size = os.path.getsize(other.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: 'bar/baz'
>>
>> -- System Information:
>> Debian Release: stretch/sid
>> APT prefers testing
>> APT policy: (900, 'testing'), (860, 'testing-proposed-updates'), (850, 'buildd-testing-proposed-updates'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental'), (690, 'buildd-experimental'), (500, 'unstable-debug'), (1, 'experimental-debug')
>> Architecture: amd64 (x86_64)
>>
>> Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
>> Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
>> Shell: /bin/sh linked to /bin/dash
>> Init: systemd (via /run/systemd/system)
>>
>> 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-3
>> ii binutils-multiarch 2.26-5
>> ii bzip2 1.0.6-8
>> ii caca-utils 0.99.beta19-2+b1
>> ii colord 1.2.12-1
>> ii cpio 2.11+dfsg-5
>> pn default-jdk | java-sdk <none>
>> ii enjarify 20151118-1
>> ii fontforge-extras 0.3-4
>> pn fp-utils <none>
>> ii genisoimage 9:1.1.11-3
>> ii gettext 0.19.7-2
>> ii ghc 7.10.3-7
>> ii ghostscript 9.18~dfsg-4
>> ii gnupg 1.4.20-4
>> pn mono-utils <none>
>> ii pdftk 2.02-3
>> ii poppler-utils 0.38.0-2
>> ii python3-debian 0.1.27
>> pn python3-guestfs <none>
>> ii python3-rpm 4.12.0.1+dfsg1-3+b2
>> ii python3-tlsh 3.4.4+20151206-1+b1
>> ii rpm2cpio 4.12.0.1+dfsg1-3+b2
>> ii sng 1.1.0-1
>> ii sqlite3 3.11.1-1
>> ii squashfs-tools 1:4.3-3
>> ii unzip 6.0-20
>> ii vim-common 2:7.4.963-1+b2
>> ii xz-utils 5.1.1alpha+20120614-2.1
>>
>> Versions of packages diffoscope suggests:
>> ii libjs-jquery 1.11.3+dfsg-4
>>
>> -- no debconf information
>>
>> --
>> bye,
>> pabs
>>
>> https://wiki.debian.org/PaulWise
>>
>>
>>
>> _______________________________________________
>> Reproducible-builds mailing list
>> Reproducible-builds at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fixed-issue-related-to-diffoscope-symlinks-crashing.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160403/79fceec4/attachment-0002.bin>
More information about the Reproducible-builds
mailing list