This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1252088 - copyin of multiple files and directories gets copied to wrong destination
copyin of multiple files and directories gets copied to wrong destination
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
21
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-10 12:49 EDT by pall.valmundsson
Modified: 2015-10-07 00:06 EDT (History)
6 users (show)

See Also:
Fixed In Version: 1.2.13-2.fc22 mock-1.2.13-2.fc21 mock-1.2.13-2.el7 mock-1.2.13-2.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-23 00:10:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description pall.valmundsson 2015-08-10 12:49:22 EDT
Description of problem:
A --copyin with multiple arguments of which at least one is a directory and not the last source file/directory will make all remaining files/directories get copied into dest_dir/argument.

Version-Release number of selected component (if applicable):
mock version: 1.2.10

How reproducible:
Always

Steps to Reproduce:
Demo #1:
touch file1.txt
mkdir dir1
mkdir dir2

mock -r epel-6-x86_64 --init
mock -r epel-6-x86_64 --copyin file1.txt dir1 dir2 /

[...]
INFO: copying file1.txt to /var/lib/mock/epel-6-x86_64/root/
INFO: copying dir1 to /var/lib/mock/epel-6-x86_64/root/
INFO: copying dir2 to /var/lib/mock/epel-6-x86_64/root/dir1
[...]

Demo #2:
mock -r epel-6-x86_64 --init
mock -r epel-6-x86_64 --copyin dir1 dir2 file1.txt /

[...]
INFO: copying dir1 to /var/lib/mock/epel-6-x86_64/root/
INFO: copying dir2 to /var/lib/mock/epel-6-x86_64/root/dir1
INFO: copying file1.txt to /var/lib/mock/epel-6-x86_64/root/dir1/dir2
[...]

Actual results:
See log snips above.

Expected results:
All source files/directories are copied into the supplied destination directory.

Additional info:
https://git.fedorahosted.org/cgit/mock.git/tree/py/mock.py?id=abacd959a3bde13ff60311a4a77c32fe0fd88b34#n754

The "dest" variable is overwritten with a new base directory which gets reused for the next file in line.
Comment 1 Miroslav Suchý 2015-08-19 06:05:28 EDT
Fixed in commit:
* 146ebf8 (origin/devel) copy files to correct location [RHBZ#1252088]
Comment 2 Fedora Update System 2015-09-16 16:02:01 EDT
mock-1.2.13-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053
Comment 3 Fedora Update System 2015-09-16 16:04:59 EDT
mock-1.2.13-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054
Comment 4 Fedora Update System 2015-09-16 16:06:58 EDT
mock-1.2.13-2.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056
Comment 5 Fedora Update System 2015-09-16 16:08:42 EDT
mock-1.2.13-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114
Comment 6 Fedora Update System 2015-09-16 16:09:47 EDT
mock-1.2.13-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115
Comment 7 Fedora Update System 2015-09-17 17:30:10 EDT
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054
Comment 8 Fedora Update System 2015-09-18 01:21:04 EDT
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056
Comment 9 Fedora Update System 2015-09-18 12:24:31 EDT
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053
Comment 10 Fedora Update System 2015-09-18 23:19:58 EDT
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115
Comment 11 Fedora Update System 2015-09-18 23:21:48 EDT
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114
Comment 12 Fedora Update System 2015-09-23 00:09:50 EDT
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2015-09-24 04:22:48 EDT
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2015-10-05 18:50:41 EDT
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2015-10-06 23:05:10 EDT
mock-1.2.13-2.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 16 Fedora Update System 2015-10-07 00:05:07 EDT
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 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.