Bug 16975 - Bytecode files for PIL.ImageQt are in the wrong rpm
Summary: Bytecode files for PIL.ImageQt are in the wrong rpm
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: advisory MGA5-32-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2015-10-18 21:24 CEST by Hartmut Goebel
Modified: 2015-11-05 09:36 CET (History)
5 users (show)

See Also:
Source RPM: python-pillow-2.6.2-2.mga5.src.rpm
CVE:
Status comment:


Attachments

Description Hartmut Goebel 2015-10-18 21:24:33 CEST
Description of problem:

The Python byte-code files for PIL.ImageQt are in the wrong package.

Steps to Reproduce:

$ urpmq -il python3-pillow-qt 2>&1 | grep ImageQt
/usr/lib64/python3.4/site-packages/PIL/ImageQt.py

$ urpmq -il python3-pillow 2>&1 | grep ImageQt
/usr/lib64/python3.4/site-packages/PIL/__pycache__/ImageQt.cpython-34.pyc
/usr/lib64/python3.4/site-packages/PIL/__pycache__/ImageQt.cpython-34.pyo

These files should be in python3-pillow-qt, too.

This can easily be fixed by adopting the %file section in the the .spec file like this:

For package python3-pillow-qt include "site-packages/PIL/__pycache__/ImageQt.*" and exclude for the other package.

Reproducible: 

Steps to Reproduce:
Hartmut Goebel 2015-10-18 21:25:27 CEST

Keywords: (none) => Junior_job

Rémi Verschelde 2015-10-18 21:29:28 CEST

Assignee: bugsquad => makowski.mageia

Comment 1 Philippe Makowski 2015-10-19 15:02:08 CEST
done in python-pillow-3.0.0-2.mga6 and  python-pillow-2.6.2-2.1.mga5
Comment 2 Philippe Makowski 2015-10-21 13:52:48 CEST
Suggested advisory:
========================

Updated python-pillow packages 
some Python byte-code files where not in the correct package


References:
https://bugs.mageia.org/show_bug.cgi?id=16975
========================

Updated packages in core/updates_testing:
========================
python-pillow-devel-2.6.2-2.1.mga5.i586
python3-pillow-qt-2.6.2-2.1.mga5.i586
python-pillow-sane-2.6.2-2.1.mga5.i586
python-pillow-qt-2.6.2-2.1.mga5.x86_64
python3-pillow-sane-2.6.2-2.1.mga5.x86_64
python-pillow-2.6.2-2.1.mga5.x86_64
python3-pillow-sane-2.6.2-2.1.mga5.i586
python-pillow-tk-2.6.2-2.1.mga5.x86_64
python-pillow-tk-2.6.2-2.1.mga5.i586
python3-pillow-2.6.2-2.1.mga5.i586
python-pillow-2.6.2-2.1.mga5.src
python-pillow-2.6.2-2.1.mga5.i586
python-pillow-sane-2.6.2-2.1.mga5.x86_64
python3-pillow-doc-2.6.2-2.1.mga5.noarch
python-pillow-devel-2.6.2-2.1.mga5.x86_64
python3-pillow-qt-2.6.2-2.1.mga5.x86_64
python3-pillow-tk-2.6.2-2.1.mga5.x86_64
python-pillow-debuginfo-2.6.2-2.1.mga5.x86_64
python-pillow-doc-2.6.2-2.1.mga5.noarch
python3-pillow-tk-2.6.2-2.1.mga5.i586
python-pillow-debuginfo-2.6.2-2.1.mga5.i586
python-pillow-qt-2.6.2-2.1.mga5.i586
python3-pillow-2.6.2-2.1.mga5.x86_64
python3-pillow-devel-2.6.2-2.1.mga5.i586
python3-pillow-devel-2.6.2-2.1.mga5.x86_64

Source RPMs: 
python-pillow-2.6.2-2.1.mga5.src.rpm

Keywords: Junior_job => (none)
Assignee: makowski.mageia => qa-bugs

David Walser 2015-10-23 16:44:34 CEST

Whiteboard: (none) => MGA5-32-OK

Comment 3 Thomas Backlund 2015-10-23 16:50:47 CEST

Sorry, but the fix is not done properly:
http://svnweb.mageia.org/packages/updates/5/python-pillow/current/SPECS/python-pillow.spec?r1=892708&r2=892707&pathrev=892708

When you move files between packages, you need to add proper conflicts on/between all affected packages, so urpmi knows they need to be in same transaction, or upgrade can fail

CC: (none) => tmb
Whiteboard: MGA5-32-OK => (none)

Comment 4 David Walser 2015-10-23 18:25:40 CEST
Indeed, good catch.  I fixed this.

python-pillow-devel-2.6.2-2.2.mga5
python3-pillow-qt-2.6.2-2.2.mga5
python-pillow-sane-2.6.2-2.2.mga5
python3-pillow-sane-2.6.2-2.2.mga5
python-pillow-tk-2.6.2-2.2.mga5
python3-pillow-2.6.2-2.2.mga5
python-pillow-2.6.2-2.2.mga5
python3-pillow-doc-2.6.2-2.2.mga5
python-pillow-doc-2.6.2-2.2.mga5
python3-pillow-tk-2.6.2-2.2.mga5
python-pillow-qt-2.6.2-2.2.mga5
python3-pillow-devel-2.6.2-2.2.mga5

from python-pillow-2.6.2-2.2.mga5.src.rpm
Comment 5 Thomas Backlund 2015-10-23 18:29:59 CEST
not quiet there yet :)

the first one should be: 

Conflicts:      %{name3}-qt < 3.0.0-2

or it just conflicts its older self...
Comment 6 Thomas Backlund 2015-10-23 18:32:01 CEST
meaining the "-qt" part, (the version in the above is from cauldron package...)
Comment 7 David Walser 2015-10-25 14:43:26 CET
No, I did it right.  When you move files from package A to B, package B needs to conflict with the older package A.  Here, the files were moved from python3-pillow to python3-pillow-{qt,tk}, and I added in python-pillow-{qt,tk} conflicts on the older python3-pillow.  This is correct.
Dave Hodgins 2015-10-26 00:35:48 CET

CC: (none) => davidwhodgins
Whiteboard: (none) => advisory

Comment 8 Herman Viaene 2015-11-03 15:44:12 CET
MGA5-32 on Acer D620 Xfce
No installation issues.
At CLI I get:
[xxxx@yyyy ~]$ urpmq -il python3-pillow-qt 2>&1 | grep ImageQt
/usr/lib/python3.4/site-packages/PIL/ImageQt.py
/usr/lib/python3.4/site-packages/PIL/ImageQt.py
/usr/lib/python3.4/site-packages/PIL/__pycache__/ImageQt.cpython-34.pyc
/usr/lib/python3.4/site-packages/PIL/__pycache__/ImageQt.cpython-34.pyo
[xxxx@yyyy ~]$ urpmq -il python3-pillow 2>&1 | grep ImageQt
/usr/lib/python3.4/site-packages/PIL/__pycache__/ImageQt.cpython-34.pyc
/usr/lib/python3.4/site-packages/PIL/__pycache__/ImageQt.cpython-34.pyo

Should be OK.

CC: (none) => herman.viaene
Whiteboard: advisory => advisory MGA5-32-OK

Comment 9 claire robinson 2015-11-03 19:33:55 CET
Thanks Herman. It appears to show file conflicts though if these were the current version.

Adding feedback marker.

Whiteboard: advisory MGA5-32-OK => advisory feedback MGA5-32-OK

Comment 10 claire robinson 2015-11-03 19:41:57 CET
Removing feedback marker. Checked here OK.

The duplicate files listed are likely due to fuzzy search also listing files in python3-pillow-qt when searching for python3-pillow. You can work around this by using urpmf instead like so..

urpmf python3-pillow: | grep ImageQt

Validating. SRPM in comment 4.

Keywords: (none) => validated_update
Whiteboard: advisory feedback MGA5-32-OK => advisory MGA5-32-OK
CC: (none) => sysadmin-bugs

Comment 11 David Walser 2015-11-03 20:59:00 CET
(In reply to claire robinson from comment #10)
> The duplicate files listed are likely due to fuzzy search also listing files
> in python3-pillow-qt when searching for python3-pillow. You can work around
> this by using urpmf instead like so..

Actually, the issue was it showing the files in the core/release version of the packages too.  If you only look at the core/updates_testing versions, you can see the files are in the right places.
Comment 12 Mageia Robot 2015-11-04 19:03:44 CET
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0169.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 13 claire robinson 2015-11-05 00:54:23 CET
File conflicts with python-pillow-sane

2 installation transactions failed

There was a problem during the installation:

file /usr/lib64/python3.4/site-packages/__pycache__/sane.cpython-34.pyc from install of python-pillow-sane-2.6.2-2.2.mga5.x86_64 conflicts with file from package python3-pillow-2.6.2-2.mga5.x86_64

file /usr/lib64/python3.4/site-packages/__pycache__/sane.cpython-34.pyo from install of python-pillow-sane-2.6.2-2.2.mga5.x86_64 conflicts with file from package python3-pillow-2.6.2-2.mga5.x86_64

file /usr/lib64/python3.4/site-packages/__pycache__/sane.cpython-34.pyc from install of python3-pillow-2.6.2-2.2.mga5.x86_64 conflicts with file from package python-pillow-sane-2.6.2-2.mga5.x86_64

file /usr/lib64/python3.4/site-packages/__pycache__/sane.cpython-34.pyo from install of python3-pillow-2.6.2-2.2.mga5.x86_64 conflicts with file from package python-pillow-sane-2.6.2-2.mga5.x86_64
Comment 14 Philippe Makowski 2015-11-05 09:26:43 CET
Hope that 2.6.2-2.3.mga5 will fix this

CC: (none) => makowski.mageia

Comment 15 claire robinson 2015-11-05 09:36:59 CET
Please use bug 17089 for the new update. Thanks.

Note You need to log in before you can comment on or make changes to this bug.