Bug 966985 - RFE: mock: please support stopping after the %prep stage
RFE: mock: please support stopping after the %prep stage
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
: FutureFeature, Reopened
Depends On:
  Show dependency treegraph
Reported: 2013-05-24 09:01 EDT by Florian Weimer
Modified: 2014-11-18 11:24 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-11-18 11:24:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
mock-prep.py (4.29 KB, text/plain)
2013-05-24 09:01 EDT, Florian Weimer
no flags Details
mock-prep.py (4.38 KB, text/plain)
2013-05-24 09:43 EDT, Florian Weimer
no flags Details

  None (edit)
Description Florian Weimer 2013-05-24 09:01:26 EDT
Created attachment 752588 [details]

Unpacking source RPMs requires a build root with the build requires installed, so it makes sense to use mock for that.  But there is no direct support for copying the results of the %prep stage out of the build root, so I wrote the attached helper script.  It would be nice to have similar functionality directly in mock.
Comment 1 Florian Weimer 2013-05-24 09:43:16 EDT
Created attachment 752628 [details]

Fix target directory handling.
Comment 2 Miroslav Suchý 2014-10-01 15:57:07 EDT
--copyout does not help you here?
Comment 3 Florian Weimer 2014-10-01 16:39:46 EDT
(In reply to Miroslav Suchý from comment #2)
> --copyout does not help you here?

I'm already using that, but I don't see an option to stop the build after the %prep stage.
Comment 4 Miroslav Suchý 2014-10-01 17:09:09 EDT
Well, there is --short-circuit option:
              Use rpmbuild's short-circuit mechanism to skip already executed stages of build.  It doesn't produce
              RPMs, it's useful only for debugging packaging. Implies --no-clean. STAGE specifies which stage will
              be executed as the first.  Available values: build, install, binary

I just extended it to allow 'prep' which translate to -bp.

Commit in msuchy-work branch as bd15c59
Comment 5 Miroslav Suchý 2014-10-12 17:18:15 EDT
Fixed in mock-1.2.0, which just landed in rawhide.
Comment 6 Michael Simacek 2014-10-14 05:03:34 EDT
Unfortunately, this doesn't work in mock-1.2.0-1, because the prep choice is missing in option parser, so although the code for it is OK, there's no way to invoke it with the commandline option. I sent patch upstream
Comment 7 Miroslav Suchý 2014-10-14 05:40:23 EDT
Commited as 9d7ad7b.
Comment 8 Miroslav Suchý 2014-11-18 11:24:24 EST
mock-1.2.2 has been release

Note You need to log in before you can comment on or make changes to this bug.