Hide Forgot
Description of problem: fedora-easy-karma fails to start by default. Version-Release number of selected component (if applicable): fedora-easy-karma-0-0.28.20150921gitc932687a.fc24.noarch Same on Fedora 23 Build 10 iso and Fedora 24 Alpha Build 7 iso. How reproducible: always – packaging issue Steps to Reproduce: 1. install fedora-easy-karma 2. try to run it Actual results: It fails to run. Traceback: $ fedora-easy-karma Traceback (most recent call last): File "/usr/bin/fedora-easy-karma", line 47, in <module> import yum ImportError: No module named yum Expected results: Run. This might require some dependencies. Doesn't RPM provide OR dependencies? If you don't want to pull in these dependencies, please add some code handling missing these and suggesting how to fix it. This is not perfect in terms of user experience, but it is doable and better than always crashing. Additional info: This is related to bug #1270600 and a duplicate imho, but in https://bugzilla.redhat.com/show_bug.cgi?id=1270600#c21 it was suggested that I open a new issue. It might be a good suggestion to keep this discussion on a technical level though.
An alternative solution would be to port f-e-k to run on both python2 and python3 and run with python3 by default on Fedora 23+, where python3-dnf is installed but python2-dnf is not. Fedora 23+, dnf is the default and thus f-e-k should depend on python3-dnf.
1) I cannot use rich dependencies (OR dependencies), because the tools used to compose Fedora do not support them right now, but this would be the ideal solution I guess 2) Porting to python3 is not possible as long as python-fedora is not available for python3 How did you install f-e-k? AFAIK in the default setting, dnf should install python2-dnf with the recent update, because it is recommended now.
(In reply to Till Maas from comment #2) > 1) I cannot use rich dependencies (OR dependencies), because the tools used > to compose Fedora do not support them right now, but this would be the ideal > solution I guess Yeah, that's bad circumstances. > 2) Porting to python3 is not possible as long as python-fedora is not > available for python3 Actually, it is: The package is called `python3-fedora`. `fedora-cert` isn't ported to python3 BUT it's just 74 lines of text (~50 lines of code). And it depends on pyOpenSSL, which is available for python3 (python3-pyOpenSSL) and python-pycurl, which is available for python3 (python3-pycurl). It looks doable as long as one is able to reach the packager of `fedora-cert`. (In reply to Till Maas from comment #2) > > How did you install f-e-k? AFAIK in the default setting, dnf should install > python2-dnf with the recent update, because it is recommended now. I just ran `dnf install fedora-easy-karma` and got a broken installation. As written above I also tested live isos, which also resulted in broken systems. I don't see how python2-dnf should be pulled in. The spec file [1] just Recommends: python2-dnf . As the packaging guidelines [2] specify, weak dependencies are ignored by default by dnf. This is why f-e-k doesn't pull in python2-dnf. [1] https://pkgs.fedoraproject.org/cgit/rpms/fedora-easy-karma.git/tree/fedora-easy-karma.spec?h=f24 [2] https://fedoraproject.org/wiki/Packaging:WeakDependencies
(In reply to Christian Stadelmann from comment #3) > (In reply to Till Maas from comment #2) > > 2) Porting to python3 is not possible as long as python-fedora is not > > available for python3 > > Actually, it is: The package is called `python3-fedora`. > > `fedora-cert` isn't ported to python3 BUT it's just 74 lines of text (~50 > lines of code). And it depends on pyOpenSSL, which is available for python3 > (python3-pyOpenSSL) and python-pycurl, which is available for python3 > (python3-pycurl). It looks doable as long as one is able to reach the > packager of `fedora-cert`. Thank your for researching this. Would you able to create a patch to make fedora-cert python3 ready? > (In reply to Till Maas from comment #2) > > > > How did you install f-e-k? AFAIK in the default setting, dnf should install > > python2-dnf with the recent update, because it is recommended now. > > I just ran `dnf install fedora-easy-karma` and got a broken installation. As > written above I also tested live isos, which also resulted in broken systems. > > I don't see how python2-dnf should be pulled in. The spec file [1] just > > Recommends: python2-dnf > > . As the packaging guidelines [2] specify, weak dependencies are ignored by > default by dnf. This is why f-e-k doesn't pull in python2-dnf. I understand the guidelines differently: | Weak dependencies are by default treated similarly to regular Requires:. | Matching packages are added to the dnf transaction. If adding the package | would lead to an error dnf will by default ignore the dependency. For me this sounds like python2-dnf should be installed by default. If it was a "Hint:" dependency, then it would be ignored. Is there maybe a bug in dnf?
(In reply to Till Maas from comment #4) > Thank your for researching this. Would you able to create a patch to > make fedora-cert python3 ready? I'll try. > (In reply to Christian Stadelmann from comment #3) > > As the packaging guidelines [2] specify, weak dependencies are ignored by > > default by dnf. This is why f-e-k doesn't pull in python2-dnf. > > I understand the guidelines differently: > > | Weak dependencies are by default treated similarly to regular Requires:. > | Matching packages are added to the dnf transaction. If adding the package > | would lead to an error dnf will by default ignore the dependency. > > For me this sounds like python2-dnf should be installed by default. If it > was a "Hint:" dependency, then it would be ignored. Is there maybe a bug in > dnf? Same document: | Weak dependencies may only be used in a package if the package still functions without the dependency present. So the packaging of f-e-k is wrong. But that hopefully won't matter with the python3-dnf stuff. Yes, looks like a bug in dnf. I've reported it as bug #1329805.
Bug is still unsolved. I'm using the same version of fedora-easy-karma. fedora-easy-karma-0-0.28.20150921gitc932687a.fc24.noarch bug: File "/usr/bin/fedora-easy-karma", line 47, in <module> import yum ImportError: No module named yum
(In reply to Christian Stadelmann from comment #5) > (In reply to Till Maas from comment #4) > > Thank your for researching this. Would you able to create a patch to > > make fedora-cert python3 ready? > > I'll try. Sorry, I can't. I don't know enough about python to fix this. Yes, issue is still present on Fedora 24.
*** Bug 1270600 has been marked as a duplicate of this bug. ***
Again: It works for me with 'dnf install python2-dnf'.
(In reply to Raphael Groner from comment #9) > Again: It works for me with 'dnf install python2-dnf'. For me too
(In reply to Emerson Santos from comment #10) > (In reply to Raphael Groner from comment #9) > > Again: It works for me with 'dnf install python2-dnf'. That's not a fix. If f-e-k doesn't pull in the dependency itself it has a broken .spec file. Since weak dependencies have landed in F24 repositories now it works fine for me and f-e-k is pulling in python2-dnf correctly. Technically, this solution is still not correct because python2-dnf is just recommended, but not required. But that should be no problem to most users. If you don't care about correctness but just about "it works", feel free to close this bug.
fedora-easy-karma-0-0.28.20150921gitc932687a.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a1ad1a4378
fedora-easy-karma-0-0.28.20150921gitc932687a.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 1425272 has been marked as a duplicate of this bug. ***
Created attachment 1256753 [details] Provide a helpful message to install python2-dnf On Fedora 25 I ran into this issue. Installing the "fedora-easy-karma" package via DNF lead to a broken install until a manual install of python2-dnf. I would suggest something along the lines of this patch to help aid users.