[Yum-devel] [PATCH] honor retries config option at mirror group level rather than grabber level

Zdenek Pavlas zpavlas at redhat.com
Wed Jul 18 12:42:35 UTC 2012


> record tries count for grab requests and report to callbacks
> +        gr.tries = 0
> +            gr.tries += 1
> +                obj.grab_request = gr

The failure callback does not need 'gr', it duplicates the 
attributes already copied to 'obj' (relative url, mirror choice
etc).  In URLGrabber._retry() we pass 'tries' to the failure
callback directly.  I'd rather implement it consistently as:

+        tries = 0
+            tries += 1
+                obj.tries = tries

..and update the handler in Yum accordingly.

>> Do we have to try all mirrors, for some reason?
> Just trying to avoid surprising the user, since current behavior is
> to try all the mirrors. Fine with me either way.

Ok, let's keep the current behavior then.  I'm OK to merge
both patches.  Then I'll implement the same semantic in the async
code path too.


More information about the Yum-devel mailing list