Bug 1174317
Summary: | --new-chroot --chroot fails | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vít Ondruch <vondruch> |
Component: | mock | Assignee: | Miroslav Suchý <msuchy> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 21 | CC: | jdisnard, mebrown, Mikhail_Campos-Guadamuz, msimacek, msuchy, praiskup, williams |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | mock-1.2.6-1.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-01-21 23:08:59 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Vít Ondruch
2014-12-15 15:58:11 UTC
It seems, that can't handle asterisks... Also, mock -r <config> --new-chroot --chroot "bash -c 'rm /builddir/build/SRPMS/*'" should work It seems to me that /builddir/build/SRPMS/* does not exist (unless you use --no-clean). And rm then gives the same error as usually: $ mkdir /tmp/foo $ rm /tmp/foo/* rm: cannot remove ‘/tmp/foo/*’: No such file or directory $ echo $? 1 Seems as NOTABUG to me. If I am missing something, please reopen. (In reply to Miroslav Suchý from comment #2) > It seems to me that /builddir/build/SRPMS/* does not exist (unless you use > --no-clean). And rm then gives the same error as usually: It exists, that is the point. I believe that Mikhail's explanation is correct. Fixed in commit fb6328d Note the new part of documentation (which just reflect how the core originaly worked): --shell [COMMAND [ARGS...]] Run the specified command interactively within the chroot (no 'clean' is performed). If no command specified, /bin/sh is run. Note that COMMAND is shell expanded using shell in chroot. --chroot COMMAND [ARGS...] Run the specified command non-interactively within the chroot (no 'clean' is performed). Command output will be sent to the log files. Note that COMMAND is shell expanded only if there are no ARGS. Otherwise there is no shell expansion. So for example: mock -r ruby22-rhel-7 --new-chroot --chroot 'rm /builddir/build/SRPMS/*' will work, but mock -r ruby22-rhel-7 --new-chroot --chroot rm /builddir/build/SRPMS/\* will not work (because that are COMMAND + one ARG. And this two will work: mock -r ruby22-rhel-7 --new-chroot --shell rm /builddir/build/SRPMS/\* mock -r ruby22-rhel-7 --new-chroot --shell 'rm /builddir/build/SRPMS/*' And all examples above behave identically even with --old-chroot. Thanks Miroslav. Nevertheless, I'd be fine if --shell always expands and --chroot never expands, but this exception: (In reply to Miroslav Suchý from comment #4) > --chroot COMMAND [ARGS...] > Run the specified command non-interactively within the > chroot (no 'clean' is performed). Command output will be sent to the log > files. Note that COMMAND is shell expanded only if there are > no ARGS. Otherwise there is no shell expansion. i.e. expanding in dependence of number of arguments is weird and I'd appreciate if you can remove it. This exception have been in mock since 2011-10-12. I just documented it now. The question is is it bug or feature. You say it is feature, I say it is bug. But we might disagree on this :) I just want to keep potential regression as low as possible. mock-1.2.4-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc21 mock-1.2.4-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc20 mock-1.2.4-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.4-1.el7 mock-1.2.4-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.4-1.el6 Package mock-1.2.4-1.el7: * should fix your issue, * was pushed to the Fedora EPEL 7 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.2.4-1.el7' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0312/mock-1.2.4-1.el7 then log in and leave karma (feedback). mock-1.2.4-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.4-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.5-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.5-1.el7 mock-1.2.5-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.5-1.el6 mock-1.2.5-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc20 mock-1.2.5-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc21 mock-1.2.5-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.6-1.el6 mock-1.2.6-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.6-1.el7 mock-1.2.6-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc20 mock-1.2.6-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc21 mock-1.2.6-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-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. mock-1.2.6-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. |