Description of problem:
Just install python-gertty and run it. It will fail due to missing alembic directory and alembic.ini file in the package. They are missing because we drop egg file during build, and setup.cfg does not mention those files, so they are ignored.
Version-Release number of selected component:
cmdline: /usr/bin/python2 /usr/bin/gertty
runlevel: N 5
script.py:46:__init__:CommandError: Path doesn't exist: '/usr/lib/python2.7/site-packages/gertty/alembic'. Please use the 'init' command to create a new scripts folder.
Traceback (most recent call last):
File "/usr/bin/gertty", line 10, in <module>
File "/usr/lib/python2.7/site-packages/gertty/app.py", line 434, in main
File "/usr/lib/python2.7/site-packages/gertty/app.py", line 149, in __init__
self.db = db.Database(self)
File "/usr/lib/python2.7/site-packages/gertty/db.py", line 469, in __init__
File "/usr/lib/python2.7/site-packages/gertty/db.py", line 492, in migrate
File "/usr/lib/python2.7/site-packages/alembic/command.py", line 105, in upgrade
script = ScriptDirectory.from_config(config)
File "/usr/lib/python2.7/site-packages/alembic/script.py", line 70, in from_config
sourceless=config.get_main_option("sourceless") == "true"
File "/usr/lib/python2.7/site-packages/alembic/script.py", line 46, in __init__
"scripts folder." % dir)
CommandError: Path doesn't exist: '/usr/lib/python2.7/site-packages/gertty/alembic'. Please use the 'init' command to create a new scripts folder.
Local variables in innermost frame:
self: <alembic.script.ScriptDirectory object at 0x7f1ce729b6d0>
Created attachment 976416 [details]
Created attachment 976417 [details]
Seems like this is also reported upstream
Gertty requires manual alembic init command
but is not yet fixed. I posted a comment there with a pointer to this bug
This is fixed in git by Pierre-Yves Chibon (thanks!)
python-gertty-1.0.3-4.fc21 has been submitted as an update for Fedora 21.
After discussions in IRC, I believe the best solution is the following:
* Keep the gertty.egg-info directory from the upstream tarball (that is, remove the "rm -rf gertty.egg-info" line from the spec: http://pkgs.fedoraproject.org/cgit/python-gertty.git/tree/python-gertty.spec?id=c54748477f16c183134ab5e9b2b7c7a5fb189d22#n60 )
* And remove the patch to setup.cfg ( http://pkgs.fedoraproject.org/cgit/python-gertty.git/tree/fix_setup.cfg.patch?id=c54748477f16c183134ab5e9b2b7c7a5fb189d22 )
The egg-info directory in the upstream tarball contains the correct information in order for the alembic files to be installed, and a closer reading of the packaging policy indicates that it is okay to keep it.
I have tested this on an f21 system and confirmed the resulting RPM has the necessariy alembic files and works.
Thanks for packaging Gertty! :)
@James, tarball eggs should be dropped as per Fedora packaging policy: http://fedoraproject.org/wiki/Packaging:Python_Eggs#Upstream_Eggs
@Ihar in this case the eggs contains metadata information which are required.
So while I agree for eggs packages, in the present case the guidelines does not apply (that page actually needs to be taught the difference between eggs package and eggs metadata).
(In reply to Pierre-YvesChibon from comment #8)
> @Ihar in this case the eggs contains metadata information which are required.
> So while I agree for eggs packages, in the present case the guidelines does
> not apply (that page actually needs to be taught the difference between eggs
> package and eggs metadata).
Pierre, I'm submitting the clarification changes to the Fedora Packaging Comittee. Toshio Kuratomi kindly reviewed the below on IRC.
1. Replaced the term 'eggs' with 'egg metadata' in the whole wiki, while
not messing up the URLs to this on both occurances.
2. In section '1.1 Why egg metadata', changed the phrase "Allowing end
users to install eggs not made from rpms or install eggs into their
home directories." to "Allowing end users to install egg packages not
made from rpms or install egg packages into their home directories."
3. In section '1.2 When to Provide egg metadata' changed the phrase "we
need to be sure to include the egg files" to "we need to be sure to
include the egg metadata"
4. Changed the section 1.3 tittle from "Upstream egg metadata" to
"Upstream egg package"
5. In section 1.3, change the phrase: "Do not distribute egg metadata
from upstream" to "Do not distribute egg packages from upstream."
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-gertty-1.0.3-4.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Looks good to me as well, thanks!
python-gertty-1.0.3-4.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.