Bug 754082

Summary: 'fedpkg clone' creates module directory even on error
Product: [Fedora] Fedora Reporter: Vojtech Vitek <vvitek>
Component: fedpkgAssignee: David Cantrell <dcantrell>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 15CC: dcantrell, hripps
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: fedpkg-1.6-1.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-29 00:20:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vojtech Vitek 2011-11-15 11:26:38 UTC
Description of problem:
'fedpkg clone' command creates module directory even on error, for example when passphrase key is wrong / not typed in / or while interrupted. Then, while trying to run the command again, there is an Error 17 message stating that file already exists, so one has to remove the directory manually.

Version-Release number of selected component (if applicable):
fedpkg-0.5.9.2-2.fc15.noarch

How reproducible:
Always

Steps to Reproduce:
$ fedpkg clone -B <module>
Cloning into bare repository /*/<module>.git...
Enter passphrase for key '/home/.../.ssh/id_rsa': 
$ echo $?
1
$ fedpkg clone -B <module>
Could not clone: Could not create directory for module <module>: [Errno 17] File exists: '/*/<module>'

Actual results:
Creates directory on error.

Expected results:
Does not create directory on error.

Comment 1 Jesse Keating 2011-11-17 18:15:54 UTC
I believe that git itself creates this directory, not fedpkg directly.  I'm not sure if I want to alter git behavior and clean up the dir on error.

Comment 2 Jesse Keating 2011-11-17 21:12:04 UTC
Wait, I'm mistaken.  You're using clone -B which is different.

Committed a fix for this in rpkg.

Comment 3 Fedora Update System 2011-11-22 20:21:05 UTC
fedpkg-1.6-1.fc16,rpkg-1.10-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/fedpkg-1.6-1.fc16,rpkg-1.10-1.fc16

Comment 4 Fedora Update System 2011-11-23 23:33:19 UTC
Package fedpkg-1.6-1.fc16, rpkg-1.10-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fedpkg-1.6-1.fc16 rpkg-1.10-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16343/fedpkg-1.6-1.fc16,rpkg-1.10-1.fc16
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-11-29 00:20:47 UTC
fedpkg-1.6-1.fc16, rpkg-1.10-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Vojtech Vitek 2011-11-30 12:57:32 UTC
Thanks Jesse!