Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1509706 - xapps: Requires both Python 2 and Python 3
xapps: Requires both Python 2 and Python 3
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: xapps (Show other bugs)
rawhide
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Alternative GTK desktop environments
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: PYTHON3
  Show dependency treegraph
 
Reported: 2017-11-05 15:33 EST by Troy Curtis
Modified: 2017-11-20 17:58 EST (History)
7 users (show)

See Also:
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-17 22:44:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Troy Curtis 2017-11-05 15:33:21 EST
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 16:13:44 EST
sorry I don't see the issue.
Comment 2 Troy Curtis 2017-11-05 20:09:31 EST
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 06:22:57 EST
(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-06 23:57:42 EST
(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 15:59:08 EST
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 05:30:47 EST
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 05:31:17 EST
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-13 23:09:38 EST
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 05:57:58 EST
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 08:11:45 EST
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 16:12:35 EST
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 08:11:45 EST
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 08:11:55 EST
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 08:26:54 EST
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 08:27:22 EST
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 14:21:34 EST
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 14:22:10 EST
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 18:53:24 EST
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 12:19:46 EST
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 10:03:04 EST
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 13:53:19 EST
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 14:55:42 EST
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-17 20:43:26 EST
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-17 22:44:53 EST
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 05:11:17 EST
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 13:46:27 EST
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 smeg 2017-11-19 23:41:07 EST
The inability find an install source for python2-xapps-overrides is preventing cinnamon from updating.
Comment 28 JM 2017-11-20 07:46:25 EST
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 07:47:08 EST
I mean is python2-gobject-base missing?
Comment 30 Troy Curtis 2017-11-20 08:38:55 EST
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 17:58:24 EST
(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.