Currently a 'fedpkg mockbuild' in a fresh clone of a package will result in something like:
[jwboyer@r2d2 kernel]$ fedpkg mockbuild error: File /home/jwboyer/src/fedora/kernel/linux-2.6.34.tar.bz2: No such file or directory Could not run mockbuild: Command 'rpmbuild --define '_sourcedir /home/jwboyer/src/fedora/kernel' --define '_specdir /home/jwboyer/src/fedora/kernel' --define '_builddir /home/jwboyer/src/fedora/kernel' --define '_srcrpmdir /home/jwboyer/src/fedora/kernel' --define '_rpmdir /home/jwboyer/src/fedora/kernel' --define 'dist .fc13' --define 'fedora 13' --define 'fc13 1' --nodeps -bs /home/jwboyer/src/fedora/kernel/kernel.spec' returned non-zero exit status 1 [jwboyer@r2d2 kernel]$
because the sources have not been downloaded yet. Under the old dist-cvs system, a mockbuild had a dependency on srpm, which had a dependency on sources.
The following patch accomplishes the a similar dependency in fedpkg by making it fetch the sources prior to doing the mock setup. Tested locally on F14.
josh
---
diff --git a/src/fedpkg.py b/src/fedpkg.py index dbae1a8..31c18dd 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -576,6 +576,12 @@ def local(args): sys.exit(1)
def mockbuild(args): + try: + pyfedpkg.sources(args.path) + except pyfedpkg.FedpkgError, e: + log.error('Could not download sources: %s' % e) + sys.exit(1) + # Pick up any mockargs from the env mockargs = [] try:
On 12/8/10 5:09 PM, Josh Boyer wrote:
The following patch accomplishes the a similar dependency in fedpkg by making it fetch the sources prior to doing the mock setup. Tested locally on F14.
Applied and pushed upstream. Will be in the next build.
buildsys@lists.fedoraproject.org