Bug 1169051

Summary: [abrt] mock: os.py:157:makedirs:OSError: [Errno 17] File exists: '/var/lib/mock/fedora-rawhide-x86_64/root/'
Product: [Fedora] Fedora Reporter: František Dvořák <valtri>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: jdisnard, mebrown, Mikhail_Campos-Guadamuz, msimacek, msuchy, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/def243a2f95731f029fc0304cb012bc597fd0520
Whiteboard: abrt_hash:61c5a7b7c24b917f418401924b415015ca9bfe17
Fixed In Version: mock-1.2.3-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-12 04:07:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description František Dvořák 2014-11-29 14:45:11 UTC
Description of problem:
Attempt to copy directory to chroot:

mock -r fedora-rawhide-x86_64 --copyin tasks /

Version-Release number of selected component:
mock-1.1.41-3.fc20

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python -tt /usr/sbin/mock -r fedora-rawhide-x86_64 --copyin tasks /
dso_list:       python-libs-2.7.5-14.fc20.x86_64
executable:     /usr/sbin/mock
kernel:         3.16.6-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
os.py:157:makedirs:OSError: [Errno 17] File exists: '/var/lib/mock/fedora-rawhide-x86_64/root/'

Traceback (most recent call last):
  File "/usr/sbin/mock", line 306, in <module>
    def do_buildsrpm(config_opts, chroot, options, args):
  File "/usr/sbin/mock", line 651, in main
    shutil.copytree(src, dest)
  File "/usr/lib64/python2.7/shutil.py", line 177, in copytree
    os.makedirs(dst)
  File "/usr/lib64/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/var/lib/mock/fedora-rawhide-x86_64/root/'

Local variables in innermost frame:
tail: 'root'
head: '/var/lib/mock/fedora-rawhide-x86_64'
name: '/var/lib/mock/fedora-rawhide-x86_64/root/'
mode: 511

Comment 1 Mikhail Campos 2014-11-29 15:40:10 UTC
specify the destination directory, must not already exist:

mock -r fedora-rawhide-x86_64 --copyin tasks /tasks

Comment 2 Miroslav Suchý 2014-12-03 11:47:22 UTC
Fixed in commit aa02a0f

Comment 3 Fedora Update System 2014-12-04 12:06:27 UTC
mock-1.2.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc21

Comment 4 Fedora Update System 2014-12-04 12:09:59 UTC
mock-1.2.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc20

Comment 5 Fedora Update System 2014-12-04 12:10:55 UTC
mock-1.2.3-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.3-1.el7

Comment 6 Fedora Update System 2014-12-04 12:12:23 UTC
mock-1.2.3-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.3-1.el6

Comment 7 Fedora Update System 2014-12-05 00:46:38 UTC
Package mock-1.2.3-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.2.3-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-16285/mock-1.2.3-1.fc21
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-12-12 04:07:20 UTC
mock-1.2.3-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-12-17 04:42:25 UTC
mock-1.2.3-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-01-06 02:06:08 UTC
mock-1.2.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2015-01-06 02:07:33 UTC
mock-1.2.3-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.