Description of problem: cherrpy v2 and cherrypy v3 are not parallel installable, yet the `python-cherrypy2` and `python-cherrypy` packages can be installed simultaneously. If you're using a cherrypy v2 based app (in my case `ipa-server`, which requires `python-cherrypy2`) and install `python-cherrypy`, the cherrypy v2 based app will break (in my case, the IPA webUI wont start). To fix this: * The `python-cherrypy2` package needs a "Conflicts: python-cherrypy" added in its spec. * The `python-cherrypy` package needs a "Conflicts: python-cherrypy2" added in its spec. How reproducible: Always. Steps to Reproduce: 1. yum install python-cherrypy2 2. yum install python-cherrypy Actual results: You can install both packages, breaking anything that uses cherrypy v2. Expected results: Installing `python-cherrpy` should remove `python-cherrypy2` and any packages that require it.
python-cherrypy and python-cherrypy2 are parallel installable. IPA WebUI needs to be fixed. If you point me at the script that starts the process, I can help create a patch for you.
The tree is at git://git.fedorahosted.org/git/freeipa.git The branch release-1-2-1 The file ipa-server/ipa-gui/ipa_webgui http://git.fedorahosted.org/git/freeipa.git/?p=freeipa.git;a=blob;f=ipa-server/ipa-gui/ipa_webgui;h=677fc9a5bce4cb92e34ecae5e6548373bbaa0f1c;hb=b6ac995b350cbfb248ea5cdd5d60b816f0925dab
Created attachment 348046 [details] Tell pkg_requires to select the TurboGears stack Try this. It's untested but with similar scripts it's all that's needed to make this work. The upstream pkg_resources/setuptools author insists on making pkg_resources determine some of the version information for importing modules at the time that pkg_resources is loaded. So we need to have a method of telling pkg_resources to import cherrypy 2 instead of the default cherrypy 3. Setting __resources__ does this. We can require TurboGears in that variable instead of CherryPy >= 2.0, < 3.0 because TurboGears has the dependency on CherryPy in its egg info.
Ok, that fixes the import error, thanks! It exposes another problem though, some sort of logging issue. ipa_webgui fails to start in daemon mode. Investigating now.
The problem is related to a hack we added to ipa_webgui. It opens the log when the script is starting up and importing TurboGears and then calls logger.shutdown() before TG is started. This must be confusing the python logger. Removing this lets the server start up normally.
Created attachment 348126 [details] Tell pkg_requires to select the TurboGears stack and shutdown logging properly This patch adds a loop that removes all the root logging handlers instead of calling logging.shutdown() If this handler is left in the all logging in the server is duplicated once TurboGears starts. If we don't initialize logging in ipa_webgui then any import errors, etc when loading TurboGears are not logged anywhere. So the hack is to initialize logging while bootstrapping things, delete those log handlers, then fire up TurboGears which opens its own logs (which happen to point to the same files).
Patch committed upstream to ipa-1-2 branch, d658e88f635fa84341e71d2de9151a37e1c69914 Committed to ipa package as 2 patches, one to fix the import and one to fix the logging.
ipa-1.2.1-5.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/ipa-1.2.1-5.fc11
ipa-1.2.1-2.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/ipa-1.2.1-2.fc10
ipa-1.2.1-2.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
ipa-1.2.1-5.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
ipa-1.2.2-1.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/ipa-1.2.2-1.fc10
ipa-1.2.2-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/ipa-1.2.2-1.fc11
ipa-1.2.2-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
ipa-1.2.2-1.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.