Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1241059 - Could not execute new_sources: unsupported second type in tuple
Summary: Could not execute new_sources: unsupported second type in tuple
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: rpkg
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-08 11:21 UTC by Pavol Babinčák
Modified: 2018-04-11 14:31 UTC (History)
10 users (show)

Fixed In Version: rpkg-1.47-7.fc25 rpkg-1.47-7.fc24 rpkg-1.47-7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-06 21:49:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavol Babinčák 2015-07-08 11:21:41 UTC
Description of problem:
If pyrpkg client (rhpkg in this case) is run on RHEL 7 machine new-sources command (sometimes?) fails with unsupported second type in tuple error.

Version-Release number of selected component (if applicable):
rpkg-1.35-2.el7
python-pycurl-7.19.0-17.el7

How reproducible:
?

Steps to Reproduce:
1. rhpkg co $REPO
2. cd ./$REPO
3. rhpkg switch-branch $BRANCH
4. rhpkg new-sources $TARBALL

Actual results:
Last command fails with error: TypeError: unsupported second type in tuple

Expected results:
Upload should start and succeed.

Additional info:
Branch doesn't contain spec file (yet). With pdb we found out that one of the values is unicode:
$ python -m pdb $(which rhpkg) -d new-sources $TARBALL
(Pdb) r
(Pdb) cont
(Pdb) post_data
[('name', u'foo'), ('md5sum', '8504338b05521750769df21185d0cd9b'), ('filename', 'tarball.zip')]

(where REPO='foo' and TARBALL='tarball.zip')

The problem seems to be that RHEL 7 is distributed with pycurl which doesn't fully support unicode: http://pycurl.sourceforge.net/doc/unicode.html#legacy-pycurl-versions

Encoding to utf-8 on a right place should fix the issue.

There is a workaround - explicitly specify name of the repository:

    rhpkg --module-name $REPO new-sources $TARBALL

Comment 1 Jan Kurik 2015-07-15 13:20:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 2 Ales Raszka 2015-09-22 07:07:31 UTC
Pull-request: https://pagure.io/rpkg/pull-request/17

Comment 3 Lubomír Sedlář 2016-01-29 10:44:39 UTC
The main issue here is that GitPython in some version returns unicode instead of str. The best fix here is to check the returned value and encode it if necessary. The place to do this is in pyrpkg/__init__.py in method load_push_url.

Comment 4 Fedora Update System 2016-12-16 11:56:51 UTC
rpkg-1.47-6.fc25 fedpkg-1.26-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-730ed750f8

Comment 5 Fedora Update System 2016-12-16 11:58:47 UTC
fedpkg-1.26-4.fc24 rpkg-1.47-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1146121922

Comment 6 Fedora Update System 2016-12-16 12:02:27 UTC
fedpkg-1.26-4.el7 rpkg-1.47-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 7 Fedora Update System 2016-12-16 12:02:44 UTC
fedpkg-1.26-4.el7 rpkg-1.47-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 8 Fedora Update System 2016-12-17 00:51:48 UTC
fedpkg-1.26-4.el7, rpkg-1.47-6.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2016-14415f0f51

Comment 9 Fedora Update System 2016-12-17 01:37:58 UTC
fedpkg-1.26-4.fc25, rpkg-1.47-6.fc25 has been pushed to the Fedora 25 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-730ed750f8

Comment 10 Fedora Update System 2016-12-19 15:22:43 UTC
fedpkg-1.26-4.el7 rpkg-1.47-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 11 Fedora Update System 2016-12-19 15:23:11 UTC
fedpkg-1.26-4.fc25 rpkg-1.47-7.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-730ed750f8

Comment 12 Fedora Update System 2016-12-19 20:59:30 UTC
fedpkg-1.26-4.fc24, rpkg-1.47-6.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-1146121922

Comment 13 Fedora Update System 2016-12-20 08:52:04 UTC
fedpkg-1.26-4.el7, rpkg-1.47-7.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2016-14415f0f51

Comment 14 Fedora Update System 2016-12-20 09:22:42 UTC
fedpkg-1.26-4.fc25, rpkg-1.47-7.fc25 has been pushed to the Fedora 25 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-730ed750f8

Comment 15 Fedora Update System 2016-12-20 17:21:46 UTC
fedpkg-1.26-4.fc25, rpkg-1.47-7.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-12-21 10:54:07 UTC
fedpkg-1.26-4.fc24 rpkg-1.47-7.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1146121922

Comment 17 Fedora Update System 2016-12-21 15:48:32 UTC
fedpkg-1.26-4.fc24, rpkg-1.47-7.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-1146121922

Comment 18 Orion Poplawski 2017-01-02 22:11:38 UTC
new-sources is working, but import still isn't:

Could not execute import_srpm: unsupported second type in tuple

File a new bug?

Comment 19 d. johnson 2017-01-03 05:14:09 UTC
rpkg is not listed as a dep for fedpkg.

without rpkg installed, it looks like this:

$ fedpkg new-sources foo-2.0.29.tar.gz
Could not execute new_sources: unsupported second type in tuple

$ fedpkg import foo-2.0.29-1.fc26.src.rpm
Could not execute import_srpm: unsupported second type in tuple

Fix / Hack:

$ sudo yum install rpkg --enablerepo=epel-testing

Results:

$ fedpkg new-sources foo-2.0.29.tar.gz
Uploading: foo-2.0.29.tar.gz
######################################################################## 100.0%
Source upload succeeded. Don't forget to commit the sources file


Looks like fedpkg really should have a "Requires: rpkg > 1.46" in the .spec.

Comment 20 Lubomír Sedlář 2017-01-03 07:12:07 UTC
Fedpkg does not depend on rpkg. It only needs pyrpkg library, which is a subpackage of rpkg. You should never need the rpkg package. However, you are right that in this case fedpkg should probably have a constraint to pull in the latest version of pyrpkg.

Comment 21 Fedora Update System 2017-01-06 21:49:30 UTC
fedpkg-1.26-4.fc24, rpkg-1.47-7.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2017-01-07 00:21:41 UTC
fedpkg-1.26-4.el7, rpkg-1.47-7.el7 has been pushed to the Fedora EPEL 7 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.