Description of problem: Well, fedpkg aborts like: $ fedpkg co --branches mfiler3 Traceback (most recent call last): File "/usr/bin/fedpkg", line 1086, in <module> args.command(args) File "/usr/bin/fedpkg", line 425, in clone pyfedpkg.clone_with_dirs(args.module[0], args.user) File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 414, in clone_with_dirs clone(module, user, top_path, bare_dir=repo_path) File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 382, in clone _run_command(cmd) File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 136, in _run_command subprocess.list2cmdline(cmd)) AttributeError: 'module' object has no attribute 'list2cmdline' Version-Release number of selected component (if applicable): fedpkg-0.5.1.4-7.fc15.noarch python-2.7.1-1.fc15.i686 How reproducible: 100% Additional info: Downgrading python to python-2.7-13.fc15.i686 does not seem to work.
Downloading python-kitchen from 0.2.2-1.fc15 to 0.2.1-0.1.a1.fc15.noarch seems to "workaround" this issue.
s/Downloading/Downgrading/
Thanks, Looking into this now.
*** Bug 667507 has been marked as a duplicate of this bug. ***
Initial discovery, python side: * list2cmdline() isn't part of the publically defined API of subprocess as given by __all__ however, it is according to the convention that all non-public methods are prepended with an underscore ("_"). list2cmdline() is also not documented (although it is refered to in documentation). * list2cmdline() is documented as (and used within subprocess for the purpose of) """Translate a sequence of arguments into a command line string, using the same rules as the MS C runtime""". It's really just for use in constructing commandlines in Windows, not on POSIX systems. Remedies: * Upstream bug opened to decide whether list2cmdline() is public or private: http://bugs.python.org/issue10838 Initial discovery kitchen side: * Kitchen has changed to only exporting things listed in subprocess.__all__ in 0.2.2. This is why 0.2.2 breaks fedpkg whereas 0.2.1 does not. Remedies: * After googling to see that list2cmdline() and two public/private variables are being used in actual code, I'm going to explicitly add list2cmdline and the other two variables to what gets exposed via kitchen.subprocess. That should fix things for now. Note that I will follow upstream for python-2.7 wrt whether these stay public or not (I don't anticipate this being fixed upstream in python-2.x, only in python-3.x so I feel comfortable with this). Discoveries fedpkg side: * list2cmdline() shouldn't be used here. It's to create a commandline that's usable by the MS C runtime. Not for Unix shells (and curiously, also not for MS cmd.exe). * fepkg is importing subprocess from kitchen in preference to subprocess from the stdlib. We should only do that on python < 2.5 (which doesn't have check_call). Fixing this will solve this issue everywhere but EPEL4 and EPEL5. Remedies: * I'll add a pair of patches for each of these issues and attach to this bug.
Created attachment 471945 [details] Import subprocess from stdlib when possible First patch to fedpkg will only use kitchen's subprocess if there isn't a new enough version available in the stdlib.
Created attachment 471947 [details] Switch away from list2cmdline() This uses ' '.join() instead of list2cmdline(). Jesse vaguely recalls there was a reason he didn't like ' '.join() but neither of us know what that would be at the moment. Since this is used in messages output by logging, this is unlikely to break anything; just result in some commandlines that aren't formatted optimally. If you find a case of that, I'll be happy to help fix it.
python-kitchen-0.2.3-2.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/python-kitchen-0.2.3-2.fc13
python-kitchen-0.2.3-2.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/python-kitchen-0.2.3-2.fc14
python-kitchen-0.2.3-2.el4 has been submitted as an update for Fedora EPEL 4. https://admin.fedoraproject.org/updates/python-kitchen-0.2.3-2.el4
python-kitchen-0.2.3-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/python-kitchen-0.2.3-2.el5
Note, this bug isn't set to close when those updates go to stable since there's the patches here to apply to fedpkg. But they should make it so that it doesn't matter that fedpkg is using private methods of subprocess until those patches can be applied.
fedora-packager-0.5.2.0-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/fedora-packager-0.5.2.0-2.el5
fedora-packager-0.5.2.0-2.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/fedora-packager-0.5.2.0-2.fc13
fedora-packager-0.5.2.0-2.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/fedora-packager-0.5.2.0-2.fc14
fedora-packager-0.5.2.0-2.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update fedora-packager'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/fedora-packager-0.5.2.0-2.el5
python-kitchen-0.2.3-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
python-kitchen-0.2.3-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
fedora-packager-0.5.2.0-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
python-kitchen-0.2.3-2.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
python-kitchen-0.2.3-2.el4 has been pushed to the Fedora EPEL 4 stable repository. If problems still persist, please make note of it in this bug report.
fedora-packager-0.5.2.0-2.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
fedora-packager-0.5.2.0-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.