Bug 1337559

Summary: python-PyPDF2 does not define %srcname
Product: [Fedora] Fedora Reporter: Raphael Groner <projects.rg>
Component: python-PyPDF2Assignee: Major Hayden 🤠 <mhayden>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 24CC: itsme_410, mhayden, opensource, projects.rg, swt, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-PyPDF2-1.25.1-12.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-28 03:34:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Raphael Groner 2016-05-19 13:03:15 UTC
Description of problem:
pdf-stapler has broken dependencies in the rawhide tree:
On x86_64:
	pdf-stapler-0.3.3-6.fc24.noarch requires python-PyPDF2
On i386:
	pdf-stapler-0.3.3-6.fc24.noarch requires python-PyPDF2
On armhfp:
	pdf-stapler-0.3.3-6.fc24.noarch requires python-PyPDF2
Please resolve this as soon as possible.


Version-Release number of selected component (if applicable):
pdf-stapler-0.3.3-6.fc24.noarch

How reproducible:
yes

Steps to Reproduce:
1. dnf install pdf-stapler
2.
3.

Actual results:
see above

Expected results:
installation works without error

Additional info:
This is due to recent rename of python-pyPDF2 to python2-pyPDF2.

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-05-19 13:26:34 UTC
Bug in python2-pypdf2 spec file.

$ dnf repoquery --provides python2-PyPDF2.noarch
python-%{srcname} = 1.25.1-6.fc24
python-%{srcname} = 1.25.1-8.fc24
python2-PyPDF2 = 1.25.1-6.fc24
python2-PyPDF2 = 1.25.1-8.fc24

Comment 2 Major Hayden 🤠 2016-05-19 13:29:00 UTC
Hello Zbigniew,

I had an issue with an Obsoletes tag that was done incorrectly.  That's been fixed in this package (currently in testing):

https://bodhi.fedoraproject.org/updates/FEDORA-2016-3a9b8bd567

Could you test this new package?

Comment 3 Raphael Groner 2016-05-19 13:55:33 UTC
Obsoletes tag works for updates only and does not help for package build and installation. A virtual Provides is a temporary solution to notify about a package rename to let them find it anyways.
https://fedoraproject.org/wiki/Packaging:Guidelines#Renaming.2FReplacing_Existing_Packages

Comment 4 Zbigniew Jędrzejewski-Szmek 2016-05-19 14:09:07 UTC
No, the Obsoletes is fine. Just %{srcname} is never defined so it doesn't get expanded.

Comment 5 Raphael Groner 2016-05-19 15:12:58 UTC
Sorry about the confusion. Use %python_provide macro as explained.
https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro

Comment 6 Till Maas 2016-05-19 15:16:57 UTC
IMHO it might be still better for pdf-stapler to depend on python2-PyPDF2 instead of just python-PyPDF2

Comment 7 Major Hayden 🤠 2016-05-19 15:17:42 UTC
Thanks for the updates, everyone.  I have a test build up with the python-provides macro fixed -- could everyone test this one, please?

Comment 8 Raphael Groner 2016-05-19 15:19:41 UTC
(In reply to Till Maas from comment #6)
> IMHO it might be still better for pdf-stapler to depend on python2-PyPDF2
> instead of just python-PyPDF2

That's what I mean in comment #3 with the virtual Provides.

Comment 9 Till Maas 2016-05-19 15:28:03 UTC
since bug 1336083 is already about the missing provides for python-pyPDF2, I renamed this bug report's title to mention the srcname issue.

Comment 10 Scott Talbert 2016-05-19 16:04:28 UTC
+%{?python_provide:%python_provide python2-PyPDF}

Shouldn't this be:

%{?python_provide:%python_provide python2-PyPDF2}

Comment 11 Fedora Update System 2016-05-19 16:24:25 UTC
python-PyPDF2-1.25.1-10.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b12debf739

Comment 12 Raphael Groner 2016-05-20 15:04:15 UTC
Today I got the same e-mail about broken dependency. Your update from comment #11 does not fix it.

Comment 13 Major Hayden 🤠 2016-05-20 18:18:25 UTC
I can't find any errors when I go through the update process. Could someone review the Obsoletes and python_provide lines from the spec and let me know if I am missing something?

http://pkgs.fedoraproject.org/cgit/rpms/python-PyPDF2.git/tree/python-PyPDF2.spec?h=f24

Comment 14 Raphael Groner 2016-05-20 18:35:08 UTC
You need to add this line:

%global srcname PyPDF2

Comment 15 Major Hayden 🤠 2016-05-20 18:47:58 UTC
As discussed in IRC, I've started setting %{srcname} in the spec which *should* make python_provide work correctly. Thanks for the help, Raphael!

Test builds coming shortly.

Comment 16 Fedora Update System 2016-05-20 18:50:30 UTC
python-PyPDF2-1.25.1-12.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-55f32f0ba2

Comment 17 Till Maas 2016-05-20 18:51:34 UTC
(In reply to Raphael Groner from comment #12)
> Today I got the same e-mail about broken dependency. Your update from
> comment #11 does not fix it.

Did you really get the same e-mail? I guess you got it for F24 and not for Rawhide as initially mentioned in this bug. I am pretty sure that updates need to be in stable for the dependencies to be fixed.


(In reply to Major Hayden from comment #13)
> I can't find any errors when I go through the update process. Could someone
> review the Obsoletes and python_provide lines from the spec and let me know
> if I am missing something?
> 
> http://pkgs.fedoraproject.org/cgit/rpms/python-PyPDF2.git/tree/python-PyPDF2.
> spec?h=f24

I looks good to me, just wait for the update to be in testing/stable afaics.

Comment 18 Till Maas 2016-05-20 18:56:11 UTC
(In reply to Major Hayden from comment #15)
> As discussed in IRC, I've started setting %{srcname} in the spec which
> *should* make python_provide work correctly. Thanks for the help, Raphael!

FYI: it appears to still work, but it was not necessary afaics, the Provides for both builds are identical except for the release values:
http://koji.fedoraproject.org/koji/rpminfo?rpmID=7720557
http://koji.fedoraproject.org/koji/rpminfo?rpmID=7717079

Comment 19 Fedora Update System 2016-05-21 01:31:59 UTC
python-PyPDF2-1.25.1-10.fc24 has been pushed to the Fedora 24 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-2016-b12debf739

Comment 20 Fedora Update System 2016-05-22 03:56:13 UTC
python-PyPDF2-1.25.1-12.fc24 has been pushed to the Fedora 24 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-2016-55f32f0ba2

Comment 21 Fedora Update System 2016-05-28 03:34:20 UTC
python-PyPDF2-1.25.1-12.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.