Bug 1536058 - There is no /usr/bin/alembic after installation of python3-alembic
Summary: There is no /usr/bin/alembic after installation of python3-alembic
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-alembic
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Randy Barlow
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-18 14:50 UTC by clime
Modified: 2018-02-20 17:13 UTC (History)
15 users (show)

Fixed In Version: python-alembic-0.9.7-3.fc26 python-alembic-0.9.7-3.fc27
Clone Of:
Environment:
Last Closed: 2018-02-20 16:37:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description clime 2018-01-18 14:50:55 UTC
Description of problem:

Hello, with python-alembic, I was used to call `alembic` (that is /usr/bin/alembic) to e.g. upgrade db to head (`alembic upgrade head`). Now the python3-alembic package does not provide /usr/bin/alembic. Would it be possible to provide it the same way it is provided for python-alembic? Thank you!

Version-Release number of selected component (if applicable):

Name         : python3-alembic
Version      : 0.9.1
Release      : 2.fc27


How reproducible:
always


Steps to Reproduce:
1. # dnf install python3-alembic
2. # /usr/bin/alembic



Actual results:
3. # bash: /usr/bin/alembic: No such file or directory

Expected results:
the alembic script is present

Comment 1 clime 2018-01-25 20:37:58 UTC
I have found out, there is python3-alembic executable. That's really not very very intuitive. Can't it be just called alembic3, please?

Comment 2 Miro Hrončok 2018-01-27 15:50:43 UTC
Either the python3 version and python2 version do the same thing and in that case there should only by one executable called alembic and that should be in the python3-alembic package.

Or the two executables do something a bit differently (by design) and in that case, the names should be alembic-2.7 and alembic-3.6 with some symblinking (alembic-2, alembic-3 and alembic).

See https://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin

This is a packaging bug in python-alembic.

Comment 3 Ralph Bean 2018-01-27 17:31:45 UTC
My bad.  Fixing!

Comment 4 Fedora Update System 2018-01-28 10:30:37 UTC
python-alembic-0.9.7-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-58784425dd

Comment 5 Fedora Update System 2018-01-28 10:30:54 UTC
python-alembic-0.9.7-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0c2ba3f905

Comment 6 Fedora Update System 2018-01-28 22:35:06 UTC
python-alembic-0.9.7-2.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-2018-0c2ba3f905

Comment 7 Fedora Update System 2018-01-28 23:05:40 UTC
python-alembic-0.9.7-2.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-2018-58784425dd

Comment 8 Randy Barlow 2018-02-08 11:29:09 UTC
I left karma feedback on both of the stable updates - I recommend only making /usr/bin/alembic be Python 3 on Rawhide since this is a backwards incompatible chnage. For f26 and f27, I recommend providing these executables, in addition to the incorrectly named ones that used to exist:

/usr/bin/alembic (Python 2 still)
/usr/bin/alembic-2
/usr/bin/alembic-2.7
/usr/bin/alembic-3
/usr/bin/alembic-3.y (where y corresponds to the version in the given release)

For Rawhide, I recommend the above but dropping the incorrectly named executables and switching /usr/bin/alembic to Python 3 as per the guidelines.

Comment 9 Randy Barlow 2018-02-08 11:36:14 UTC
I noticed that the Rawhide package does not provide the alembic-* symlinks, so I am going to fix that now.

Comment 10 Randy Barlow 2018-02-08 14:02:49 UTC
Also, upon re-reading the guidelines, the Python 2 package is still supposed to provide /usr/bin/alembic (I had thought we switched that mistakenly), so the Python 3 package should only provide /usr/bin/alembic-3 and /usr/bin/alembic-3.y.

Comment 11 Charalampos Stratakis 2018-02-08 14:24:38 UTC
(In reply to Randy Barlow from comment #10)
> Also, upon re-reading the guidelines, the Python 2 package is still supposed
> to provide /usr/bin/alembic (I had thought we switched that mistakenly), so
> the Python 3 package should only provide /usr/bin/alembic-3 and
> /usr/bin/alembic-3.y.

That's not true, unless the binary provides different functionality for python2 and python3.

If not the default and only choice for packaging it should be within the python3 subpackage.

Comment 12 Randy Barlow 2018-02-08 14:37:13 UTC
(In reply to Charalampos Stratakis from comment #11)
> That's not true, unless the binary provides different functionality for
> python2 and python3.
> 
> If not the default and only choice for packaging it should be within the
> python3 subpackage.

I don't believe the python3-alembic executable will be able to run python2 migrations, though I admit I am following a bit of an assumption there. Are you sure that the python3-alembic is capable of running python2 migrations?

Comment 13 Randy Barlow 2018-02-08 14:40:27 UTC
I've confirmed it with bodhi's migrations - python3-alembic cannot run python2 migrations (Bodhi is python2 only).

Comment 14 Randy Barlow 2018-02-08 14:47:34 UTC
I've filed https://src.fedoraproject.org/rpms/python-alembic/pull-request/1 with the changes I've proposed above.

Comment 15 Charalampos Stratakis 2018-02-08 14:50:12 UTC
(In reply to Randy Barlow from comment #12)
> (In reply to Charalampos Stratakis from comment #11)
> > That's not true, unless the binary provides different functionality for
> > python2 and python3.
> > 
> > If not the default and only choice for packaging it should be within the
> > python3 subpackage.
> 
> I don't believe the python3-alembic executable will be able to run python2
> migrations, though I admit I am following a bit of an assumption there. Are
> you sure that the python3-alembic is capable of running python2 migrations?

I'm only commenting on the python packaging guidelines, I'm not familiar with the package in question.

Comment 16 Randy Barlow 2018-02-08 15:01:25 UTC
(In reply to Charalampos Stratakis from comment #15)
> I'm only commenting on the python packaging guidelines, I'm not familiar
> with the package in question.

Ah. Yeah I was commenting specifically about this package WRT the guidelines[0], not generally for all Python packages. Since the first line[1] doesn't apply since we really do need to ship two executables, the later line[2] does apply here.


[0] https://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin
[1] "If only one executable is to be shipped, then it owns its own slot and should use /usr/bin/python3 from Fedora 22 on."
[2] "The unversioned executable must be the python2 version."

Comment 17 Fedora Update System 2018-02-08 15:19:55 UTC
python-alembic-0.9.7-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0b6557321b

Comment 18 Fedora Update System 2018-02-08 15:20:12 UTC
python-alembic-0.9.7-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ac1ead69d3

Comment 19 Fedora Update System 2018-02-09 18:34:58 UTC
python-alembic-0.9.7-3.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-2018-ac1ead69d3

Comment 20 Fedora Update System 2018-02-09 18:47:13 UTC
python-alembic-0.9.7-3.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-2018-0b6557321b

Comment 21 Fedora Update System 2018-02-20 16:37:59 UTC
python-alembic-0.9.7-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2018-02-20 17:13:56 UTC
python-alembic-0.9.7-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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