-----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
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?
-sv
-----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 continueIs 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
On Thu, 2007-10-04 at 13:00 -0500, Clark Williams wrote:
-----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 continueIs 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?
part of mock.
-sv
On Thu, Oct 04, 2007 at 02:06:12PM -0400, seth vidal wrote:
On Thu, 2007-10-04 at 13:00 -0500, Clark Williams wrote:
-----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
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?
part of mock.
I agree. More of a long-term thing, though. Here is my list of stuff we need to work on:
1) "inside-out" setuid scheme (part of an overall revamp on how we see security for mock running. We currently dont have a coherent strategy or vision). 2) use yum-utils rather than calling cmdline 3) better caching (downloaded yum stuff, chroot cache) 4) more reliable mount/umount 5) Speedup options: ccache/distcc
-- Michael
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Michael E Brown wrote:
On Thu, Oct 04, 2007 at 02:06:12PM -0400, seth vidal wrote:
On Thu, 2007-10-04 at 13:00 -0500, Clark Williams wrote:
-----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
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?
part of mock.
I agree. More of a long-term thing, though. Here is my list of stuff we need to work on:
- "inside-out" setuid scheme (part of an overall revamp on how we see
security for mock running. We currently dont have a coherent strategy or vision). 2) use yum-utils rather than calling cmdline 3) better caching (downloaded yum stuff, chroot cache) 4) more reliable mount/umount 5) Speedup options: ccache/distcc
All good. I agree completely.
Now tell me if my short-term fix for $SUBJECT is acceptable :)
Clark
buildsys@lists.fedoraproject.org