| Summary: | mock's --no-cleanup-after doesn't stop BUILDROOT from being emptied | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Philip Prindeville <philipp> |
| Component: | mock | Assignee: | Clark Williams <williams> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 16 | CC: | mebrown, philipp, sergio, williams |
| Target Milestone: | --- | Keywords: | Improvement |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-08-02 02:10:49 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
Philip Prindeville
2011-11-19 00:17:22 UTC
Is this still failing? I just tried a package build with --no-cleanup-after and the chroot buildroot still has all the contents of the package there. vb (In reply to comment #1) > Is this still failing? I just tried a package build with --no-cleanup-after > and the chroot buildroot still has all the contents of the package there. vb Which exact command did you use to build so I can reproduce it? Further clarifying, I noticed that if I ran: % mock --update --no-cleanup-after --rebuild -r fedora-16-x86_64 clamav-0.97.3-1602.fc17.src.rpm but I'd still need to comment out the %clean section in the RPM itself. So I guess I'm wondering how to stop rpmbuild from *both* doing the automatic clean and from running the %clean section of the .spec file. Ok, I did a small test rpm of hello world: $ mock -r fedora-15-x86_64 --no-cleanup-after rpms/hello-2.6-1.el5.src.rpm Went over to /var/lib/mock/fedora-15-x86_64/root/builddir/build and everything seemed to be there. Ok, and I just did the same for fedora-16-x86_64: ... Requires(interp): /bin/sh /bin/sh Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(post): /bin/sh info Requires(preun): /bin/sh info Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) rtld(GNU_HASH) Processing files: hello-debuginfo-2.6-2.fc16.x86_64 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/hello-2.6-2.fc16.x86_64 Wrote: /builddir/build/RPMS/hello-2.6-2.fc16.x86_64.rpm Wrote: /builddir/build/RPMS/hello-debuginfo-2.6-2.fc16.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.sDaodk + umask 022 + cd /builddir/build/BUILD + cd hello-2.6 + rm -rf /builddir/build/BUILDROOT/hello-2.6-2.fc16.x86_64 + exit 0 Child returncode was: 0 LEAVE do --> Is what I see in the result/build.log file, and indeed looking in BUILDROOT it's empty: [philipp@builder hello]$ ls /var/lib/mock/fedora-16-x86_64/root/builddir/build/BUILDROOT/ [philipp@builder hello]$ so my suggestion is that the --no-cleanup-after should inhibit the %clean section from being run. (In reply to comment #5) > > so my suggestion is that the --no-cleanup-after should inhibit the %clean > section from being run. I'm not sure of an easy way to do that using rpmbuild. Do I need to file a bug against rpmbuild and link it? It would be an RFE (request for enhancement). Not sure how much people want it but you can try. Closing this as a mock bug. JFTR, this works now [1] mock -r fedora-33-x86_64 --no-clean --rebuild foo.src.rpm --rpmbuild-opts=--noclean --no-cleanup-after [1] https://lists.fedoraproject.org/archives/list/buildsys@lists.fedoraproject.org/message/IJ54KDCICTXU3Y6NHMH5C66SNOO6RHQL/ |