Bug 1509706 - xapps: Requires both Python 2 and Python 3
Summary: xapps: Requires both Python 2 and Python 3
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: xapps
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Alternative GTK desktop environments
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3
TreeView+ depends on / blocked
 
Reported: 2017-11-05 20:33 UTC by Troy Curtis
Modified: 2017-11-20 22:58 UTC (History)
7 users (show)

Fixed In Version: xapps-1.0.4-12.fc27 xapps-1.0.4-12.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-18 03:44:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Troy Curtis 2017-11-05 20:33:21 UTC
xapps currently has a requires on python2-xapps-overrides, but it does not appear to actually need those overrides for any functionality.  

Additionally, shouldn't the python2-xapps-overrides have a requires on xapps since it uses the typelib found in that package?

Comment 1 leigh scott 2017-11-05 21:13:44 UTC
sorry I don't see the issue.

Comment 2 Troy Curtis 2017-11-06 01:09:31 UTC
Did I misread the spec file or RPM requires?  Or you don't see how requiring the python 2 library is an issue.  If the later, it may have helped if I used this template, but it seemed like it was mostly not applicable to this package, since all the she-bangs are good, and it already has a python2 subpackage:

The xapps RPM requires both Python 2 and Python 3.

Except in very special circumstances, there is no need for one package
to drag in both Python stacks. Usually, this is a packaging error: for
example, a stray "/usr/bin/python" shebang in a Python 3 package can
introduce a Python 2 dependency.

Please split your package, or remove the stray dependencies.
There is a section on shebangs in the Python RPM Porting Guide [0]
which covers this issue.

It's ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 27 as well.


If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
to help investigating or fixing this issue!


[0] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#are-shebangs-dragging-you-down-to-python-2

On the python2-xapps-overrides not having a requires on xapps.  It would probably be odd, but if someone installed 'python2-xapps-overrides' directly they would not have a functioning install, since the required *.typelib is in the xapps package.  Perhaps this is such an unlikely scnenario it doesn't warrant addressing.  I just thought I'd point it out.

Comment 3 leigh scott 2017-11-06 11:22:57 UTC
(In reply to Troy Curtis from comment #2)
> Did I misread the spec file or RPM requires?  Or you don't see how requiring
> the python 2 library is an issue.  If the later, it may have helped if I
> used this template, but it seemed like it was mostly not applicable to this
> package, since all the she-bangs are good, and it already has a python2
> subpackage:
> 
> The xapps RPM requires both Python 2 and Python 3.
> 

No python2 requires on python2-xapps-overrides

$ rpm -q --requires python2-xapps-overrides
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


and only python3 for xapps

$ rpm -q --requires xapps
/bin/bash
/bin/sh
/bin/sh
/bin/sh
/usr/bin/python3
fpaste
inxi
libX11.so.6()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libcairo.so.2()(64bit)
libgdk-3.so.0()(64bit)
libglib-2.0.so.0()(64bit)
libgnomekbdui.so.8()(64bit)
libgobject-2.0.so.0()(64bit)
libgtk-3.so.0()(64bit)
libpthread.so.0()(64bit)
python2-xapps-overrides(x86-64) = 1.0.4-2.fc27
python3-gobject-base
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rtld(GNU_HASH)
xdg-utils





> Except in very special circumstances, there is no need for one package
> to drag in both Python stacks. Usually, this is a packaging error: for
> example, a stray "/usr/bin/python" shebang in a Python 3 package can
> introduce a Python 2 dependency.
> 
> Please split your package, or remove the stray dependencies.
> There is a section on shebangs in the Python RPM Porting Guide [0]
> which covers this issue.
> 
> It's ok to do this in Rawhide only, however, it would be greatly
> appreciated if you could push it to Fedora 27 as well.
> 
> 
> If anything is unclear, or if you need any kind of assistance, you can
> ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
> to help investigating or fixing this issue!
> 
> 
> [0]
> http://python-rpm-porting.readthedocs.io/en/latest/application-modules.
> html#are-shebangs-dragging-you-down-to-python-2
> 
> On the python2-xapps-overrides not having a requires on xapps.  It would
> probably be odd, but if someone installed 'python2-xapps-overrides' directly
> they would not have a functioning install, since the required *.typelib is
> in the xapps package.  Perhaps this is such an unlikely scnenario it doesn't
> warrant addressing.  I just thought I'd point it out.

Comment 4 Troy Curtis 2017-11-07 04:57:42 UTC
(In reply to leigh scott from comment #3)
> (In reply to Troy Curtis from comment #2)

> 
> No python2 requires on python2-xapps-overrides
> 
> $ rpm -q --requires python2-xapps-overrides
> rpmlib(CompressedFileNames) <= 3.0.4-1
> rpmlib(FileDigests) <= 4.6.0-1
> rpmlib(PartialHardlinkSets) <= 4.0.4-1
> rpmlib(PayloadFilesHavePrefix) <= 4.0-1
> rpmlib(PayloadIsXz) <= 5.2-1

True enough! Though that does bring up a different missing requires, in order to accomplish 'from gi.overrides import override' in XApp.py, the python2-xapps-overrides really needs to list python-gobject-base as a requires, which would end up pulling in python2.

If I made a pull request that perhaps better illustrated my concerns and a suggested resolution, would you be willing to review it and consider merging it?

Comment 5 Miro Hrončok 2017-11-07 20:59:08 UTC
python2-xapps-overrides not requiring python2 is a packaging error

To quote from https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Ownership

> Directory ownership is a little more complex than file ownership.
> Packages must own all directories they put files in, except for:
> any directories owned by the filesystem, man, or other explicitly created -filesystem packages
> any directories owned by other packages in your package's natural dependency chain

Installing to /usr/lib/python2.7/site-packages/gi thus needs to require python2-gobject-base.

Comment 6 Fedora Update System 2017-11-13 10:30:47 UTC
cinnamon-control-center-3.6.2-2.fc26 cinnamon-3.6.2-1.fc26 cinnamon-screensaver-3.6.1-1.fc26 cinnamon-translations-3.6.2-1.fc26 cinnamon-desktop-3.6.2-3.fc26 cjs-3.6.1-1.fc26 xapps-1.0.4-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ebe0c8716d

Comment 7 Fedora Update System 2017-11-13 10:31:17 UTC
cinnamon-control-center-3.6.2-2.fc27 cinnamon-screensaver-3.6.1-1.fc27 cinnamon-3.6.2-1.fc27 cinnamon-translations-3.6.2-1.fc27 cinnamon-desktop-3.6.2-3.fc27 cjs-3.6.1-1.fc27 xapps-1.0.4-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a00ca207c

Comment 8 Fedora Update System 2017-11-14 04:09:38 UTC
cinnamon-3.6.2-1.fc26, cinnamon-control-center-3.6.2-2.fc26, cinnamon-desktop-3.6.2-3.fc26, cinnamon-screensaver-3.6.1-1.fc26, cinnamon-translations-3.6.2-1.fc26, cjs-3.6.1-1.fc26, xapps-1.0.4-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ebe0c8716d

Comment 9 Fedora Update System 2017-11-14 10:57:58 UTC
cinnamon-3.6.2-1.fc27, cinnamon-control-center-3.6.2-2.fc27, cinnamon-desktop-3.6.2-3.fc27, cinnamon-screensaver-3.6.1-1.fc27, cinnamon-translations-3.6.2-1.fc27, cjs-3.6.1-1.fc27, xapps-1.0.4-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a00ca207c

Comment 10 Miro Hrončok 2017-11-14 13:11:45 UTC
This is still a problem:

$ mock -r fedora-rawhide-x86_64 --init
$ mock -r fedora-rawhide-x86_64 --remove python3
$ mock -r fedora-rawhide-x86_64 --remove python2
$ mock -r fedora-rawhide-x86_64 --install xapps
Installing dependencies:
...
 python2                  x86_64  2.7.14-2.fc28        fedora  100 k
 python2-gobject-base     x86_64  3.26.1-1.fc28        fedora  302 k
 python2-libs             x86_64  2.7.14-2.fc28        fedora  6.3 M
 python2-pip              noarch  9.0.1-11.fc27        fedora  1.8 M
 python2-setuptools       noarch  36.2.0-8.fc28        fedora  598 k
 python2-xapps-overrides  x86_64  1.0.4-3.fc28         fedora  9.2 k
 python3                  x86_64  3.6.3-2.fc28         fedora   68 k
 python3-bind             noarch  32:9.11.1-6.P3.fc27  fedora  138 k
 python3-gobject-base     x86_64  3.26.1-1.fc28        fedora  303 k
 python3-libs             x86_64  3.6.3-2.fc28         fedora  8.6 M
 python3-pip              noarch  9.0.1-11.fc27        fedora  1.7 M
 python3-ply              noarch  3.9-5.fc28           fedora  107 k
 python3-setuptools       noarch  36.2.0-8.fc28        fedora  597 k
...

Comment 11 Troy Curtis 2017-11-14 21:12:35 UTC
I've submitted a PR [0] for a suggested resolution.  It appears the only impact to dependent packages is to cinnamon, which I've also submitted a PR [1] for.  The other dependencies do not need the python functionality from xapps.

0: https://src.fedoraproject.org/rpms/xapps/pull-request/1
1: https://src.fedoraproject.org/rpms/cinnamon/pull-request/1

Comment 12 Fedora Update System 2017-11-15 13:11:45 UTC
xapps-1.0.4-4.fc26 cinnamon-3.6.2-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b08c250c9c

Comment 13 Fedora Update System 2017-11-15 13:11:55 UTC
xapps-1.0.4-4.fc27 cinnamon-3.6.2-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-dc6b8866ad

Comment 14 Fedora Update System 2017-11-15 13:26:54 UTC
cinnamon-3.6.2-2.fc27 xapps-1.0.4-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-dc6b8866ad

Comment 15 Fedora Update System 2017-11-15 13:27:22 UTC
cinnamon-3.6.2-2.fc26 xapps-1.0.4-4.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b08c250c9c

Comment 16 Fedora Update System 2017-11-15 19:21:34 UTC
cinnamon-3.6.2-1.fc27 cinnamon-control-center-3.6.2-3.fc27 cinnamon-desktop-3.6.2-3.fc27 cinnamon-screensaver-3.6.1-1.fc27 cinnamon-translations-3.6.2-1.fc27 cjs-3.6.1-1.fc27 xapps-1.0.4-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a00ca207c

Comment 17 Fedora Update System 2017-11-15 19:22:10 UTC
cinnamon-3.6.2-1.fc26 cinnamon-control-center-3.6.2-3.fc26 cinnamon-desktop-3.6.2-3.fc26 cinnamon-screensaver-3.6.1-1.fc26 cinnamon-translations-3.6.2-1.fc26 cjs-3.6.1-1.fc26 xapps-1.0.4-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ebe0c8716d

Comment 18 Fedora Update System 2017-11-15 23:53:24 UTC
cinnamon-3.6.2-2.fc27, xapps-1.0.4-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-dc6b8866ad

Comment 19 Fedora Update System 2017-11-16 17:19:46 UTC
cinnamon-3.6.2-2.fc26, xapps-1.0.4-4.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b08c250c9c

Comment 20 Fedora Update System 2017-11-17 15:03:04 UTC
cinnamon-3.6.2-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-dc6b8866ad

Comment 21 Fedora Update System 2017-11-17 18:53:19 UTC
cinnamon-3.6.2-1.fc27, cinnamon-control-center-3.6.2-3.fc27, cinnamon-desktop-3.6.2-3.fc27, cinnamon-screensaver-3.6.1-1.fc27, cinnamon-translations-3.6.2-1.fc27, cjs-3.6.1-1.fc27, xapps-1.0.4-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a00ca207c

Comment 22 Fedora Update System 2017-11-17 19:55:42 UTC
cinnamon-3.6.3-1.fc27 cinnamon-control-center-3.6.3-1.fc27 cinnamon-desktop-3.6.2-3.fc27 cinnamon-screensaver-3.6.1-1.fc27 cinnamon-translations-3.6.2-1.fc27 cjs-3.6.1-1.fc27 nemo-3.6.3-1.fc27 xapps-1.0.4-11.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a00ca207c

Comment 23 Fedora Update System 2017-11-18 01:43:26 UTC
cinnamon-3.6.2-1.fc26, cinnamon-control-center-3.6.2-3.fc26, cinnamon-desktop-3.6.2-3.fc26, cinnamon-screensaver-3.6.1-1.fc26, cinnamon-translations-3.6.2-1.fc26, cjs-3.6.1-1.fc26, xapps-1.0.4-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ebe0c8716d

Comment 24 Fedora Update System 2017-11-18 03:44:53 UTC
cinnamon-3.6.3-1.fc27, cinnamon-control-center-3.6.3-1.fc27, cinnamon-desktop-3.6.2-3.fc27, cinnamon-screensaver-3.6.1-1.fc27, cinnamon-translations-3.6.2-1.fc27, cjs-3.6.1-1.fc27, nemo-3.6.3-1.fc27, xapps-1.0.4-11.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2017-11-18 10:11:17 UTC
cinnamon-3.6.3-1.fc26 cinnamon-control-center-3.6.3-1.fc26 cinnamon-desktop-3.6.2-3.fc26 cinnamon-screensaver-3.6.1-1.fc26 cinnamon-translations-3.6.2-1.fc26 cjs-3.6.1-1.fc26 nemo-3.6.3-1.fc26 xapps-1.0.4-11.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ebe0c8716d

Comment 26 Fedora Update System 2017-11-18 18:46:27 UTC
cinnamon-3.6.3-1.fc26, cinnamon-control-center-3.6.3-1.fc26, cinnamon-desktop-3.6.2-3.fc26, cinnamon-screensaver-3.6.1-1.fc26, cinnamon-translations-3.6.2-1.fc26, cjs-3.6.1-1.fc26, nemo-3.6.3-1.fc26, xapps-1.0.4-11.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Erik Lentz 2017-11-20 04:41:07 UTC
The inability find an install source for python2-xapps-overrides is preventing cinnamon from updating.

Comment 28 JM 2017-11-20 12:46:25 UTC
python2-xapps-overrides requires now python2-gobject-base but I can't find it in the Fedora 26 (x86_64) repository (I tried Updates-Testing as well). Is python2-xapps-overrides missing?

Comment 29 JM 2017-11-20 12:47:08 UTC
I mean is python2-gobject-base missing?

Comment 30 Troy Curtis 2017-11-20 13:38:55 UTC
Ah, it was pushed to f26 and not just f27 and rawhide.  

In f26 the package is called python-gobject-base, it was before the rename.

Comment 31 Björn 'besser82' Esser 2017-11-20 22:58:24 UTC
(In reply to smeg from comment #27)
> The inability find an install source for python2-xapps-overrides is
> preventing cinnamon from updating.

This should be fixed now with -12 release just being pushed to stable.


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