Patch for BZ 303791?

Clark Williams williams at redhat.com
Thu Oct 4 18:00:41 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

seth vidal wrote:
> On Thu, 2007-10-04 at 12:40 -0500, Clark Williams wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Below is a patch for the $SUBJECT bz. I originally just changed the case of the
>> search string to match what 'yum resolvedep' was printing, but then I thought about
>> whether folks might not have the changed version of yum...
>>
>> After I took an aspirin to deal with the dependency combinatorial explosion headache,
>> I looked at the code again. I didn't really want to pull in the re package just for
>> this one case, so I resorted to doing a case-insensitive match, which I *hope* will
>> deal with most cases.
>>
>> What do you guys think?
>>
>> Clark
>>
>> diff --git a/mock.py b/mock.py
>> index 54b8f8c..35c3592 100644
>> - --- a/mock.py
>> +++ b/mock.py
>> @@ -355,9 +355,11 @@ class Root:
>>          # pass build reqs (as strings) to installer
>>          if arg_string != "":
>>              (retval, output) = self.yum('resolvedep %s' % arg_string)
>> +            searchstr = 'no package found for'
>>              for line in output.split('\n'):
>> - -                if line.find('No Package found for') != -1:
>> - -                    errorpkg = line.replace('No Package found for', '')
>> +                idx = line.lower().find(searchstr)
>> +                if idx != -1:
>> +                    errorpkg = line[idx+len(searchstr):]
>>                      error(output)
>>                      raise BuildError, "Cannot find build req %s. Exiting." % errorpkg
>>              # nothing made us exit, so we continue
> 
> Is it time to start writing simple, custom yum-utils just for mock? So
> it can call them as a program but also so mock can more rigidly control
> its output?
> 

Maybe....

Are you talking about stuff that is a part of mock, a part of yum, or a separate
package altogether?

Clark

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHBSpJHyuj/+TTEp0RAmAJAKCTOzowhq8DMT71CrfRLON79c35HQCfYD1k
S2qn/04z/xhtqRSgggvMd0o=
=za13
-----END PGP SIGNATURE-----




More information about the Fedora-buildsys-list mailing list