Mock SCM Issue

Marko Myllynen myllynen at redhat.com
Thu Oct 27 10:41:57 UTC 2011


Hi,

thanks for the report, it seems that nobody had really tested Mock SCM
on RHEL 5 before. I opened a BZ about this and attached a patch which
fixes the issues with RHEL 5 RPM Python API and RHEL 5 tar, please try
it out:

https://bugzilla.redhat.com/show_bug.cgi?id=749518

Cheers,

On 2011-10-27 02:17, Jarod Watkins wrote:
> Sorry I forgot to reply all:
> 
> mock -r centos-5-x86_64 --scm-enable --scm-option package=package_name
> --scm-option git_get='git clone repourl reponame' --scm-option
> spec='package_name.spec' -v
> 
> and in my site-defaults.cfg I have:
> 
> config_opts['scm'] = True
> config_opts['scm_opts']['method'] = 'git'
> config_opts['scm_opts']['ext_src_dir'] = '/dev/null'
> config_opts['scm_opts']['write_tar'] = True
> config_opts['scm_opts']['branch'] = 'master'
> 
> On Wed, Oct 26, 2011 at 5:37 PM, Clark Williams
> <clark.williams at gmail.com> wrote:
>> On Wed, 26 Oct 2011 17:04:18 -0400
>> Jarod Watkins <jwatkins at jarodw.com> wrote:
>>
>>> Hello,
>>> I am trying to build an RPM with Mock via a git repo. It seems like I
>>> run into an issue with the Sources option inside my spec file:
>>>
>>>
>>> DEBUG: Initializing SCM integration...
>>> DEBUG: SCM checkout command: git clone git://gitrepo reponame
>>> DEBUG: SCM checkout post command: git checkout master
>>> DEBUG: SCM checkout directory: /tmp/tmp2178L4.mock-scm.reponame
>>> DEBUG: Executing command: ['git', 'clone', 'git://gitrepo', 'reponame']
>>> DEBUG: Cloning into reponame...
>>> DEBUG: Child returncode was: 0
>>> DEBUG: Executing command: ['git', 'checkout', 'master']
>>> DEBUG: Already on 'master'
>>> DEBUG: Child returncode was: 0
>>> DEBUG: Fetched sources from SCM
>>> DEBUG: Preparing SCM sources
>>> ERROR: iteration over non-sequence
>>> Traceback (most recent call last):
>>>  File "/usr/sbin/mock", line 864, in ?
>>>    main(retParams)
>>>  File "/usr/sbin/mock", line 672, in main
>>>    (options.sources, options.spec) = scmWorker.prepare_sources()
>>>  File "/usr/lib/python2.4/site-packages/mockbuild/scm.py", line 111,
>>> in prepare_sources
>>>    for (filename, num, flags) in rpm_spec.sources:
>>> TypeError: iteration over non-sequence
>>
>> This is complaining that rpm_spec.sources is not a sequence.
>>
>> What command line did you use to invoke mock?
>>
>>
>>>
>>> My spec file is a normal spec file that can be built via Mock when not
>>> attempting to use it from Git. My Mock version is 1.0.22 from EPEL on
>>> a CentOS 5 box.
>>>
>>> Is this a known issue or am I doing something wrong?
>>>
>>> Thanks,
>>> Jarod
>>> --
>>> buildsys mailing list
>>> buildsys at lists.fedoraproject.org
>>> https://admin.fedoraproject.org/mailman/listinfo/buildsys
>>


-- 
Marko Myllynen


More information about the buildsys mailing list