Bug 237887

Summary: graphics/py-mcomix: Fix runtime with graphics/py-pillow 6.0
Product: Ports & Packages Reporter: Kai Knoblich <kai>
Component: Individual Port(s)Assignee: Kai Knoblich <kai>
Status: Closed FIXED    
Severity: Affects Only Me CC: ashish, koobs
Priority: --- Flags: koobs: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 237426    
Attachments:
Description Flags
py-mcomix-fix-runtime-with-pillow-6.0.patch ashish: maintainer-approval+

Description Kai Knoblich freebsd_committer freebsd_triage 2019-05-13 19:37:03 UTC
Created attachment 204364 [details]
py-mcomix-fix-runtime-with-pillow-6.0.patch

Hi,

during the QA measure to ensure a smooth update of graphics/py-pillow to 6.0 (bug #237426) I discovered that graphics/py-mcomix will break at runtime.

This is due the removal of the previously deprecated constant "Image.VERSION" that is still being used by graphics/py-mcomix. [1]

It has been already reported to upstream [2] and was fixed partially because another issue with PNG files that contain EXIF information is still open at the moment. [3]

The attached patch contains both fixes.

QA:
~~~
- poudriere (11.2-, 12.0-RELEASE, 13.0-CURRENT@r346346 amd64 + i386) ->
- portlint -> OK
- Quick runtime tests -> OK, but more thorough testing would be preferable
--
[1] https://github.com/python-pillow/Pillow/blob/master/docs/deprecations.rst#version-constant
[2] https://sourceforge.net/p/mcomix/bugs/116/
[3] https://sourceforge.net/p/mcomix/bugs/116/#72db
Comment 1 Ashish SHUKLA freebsd_committer freebsd_triage 2019-05-16 15:56:31 UTC
Comment on attachment 204364 [details]
py-mcomix-fix-runtime-with-pillow-6.0.patch

Looks good to me, and works as mentioned. You can go ahead, and commit.

Thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-05-18 11:15:58 UTC
A commit references this bug:

Author: kai
Date: Sat May 18 11:15:01 UTC 2019
New revision: 501950
URL: https://svnweb.freebsd.org/changeset/ports/501950

Log:
  graphics/py-mcomix: Fix runtime with graphics/py-pillow 6.0

  * Prevent runtime breakage when graphics/py-pillow is updated to 6.0 where
    the deprecated constant "Image.VERSION" is no longer available. [1]

  * Add a workaround for the behavior of the "_getexif" function that is still
    buggy with PNG files that contain EXIF meta data. [2]

  Also while I'm here:
  * Add "gnome" to USES as using USE_GNOME alone is deprecated.

  PR:		237887, 237426 (related)
  Approved by:	ashish (maintainer)
  Obtained from:	upstream [1], https://github.com/multiSnow/mcomix3/issues/76 [2]

Changes:
  head/graphics/py-mcomix/Makefile
  head/graphics/py-mcomix/files/
  head/graphics/py-mcomix/files/patch-mcomix_image__tools.py
  head/graphics/py-mcomix/files/patch-mcomix_run.py
Comment 3 Kai Knoblich freebsd_committer freebsd_triage 2019-05-18 11:16:51 UTC
Committed, thank you for your review and approval!