[Yum-devel] [PATCH] Move default urlgrabber options into _default_grabopts(), apply them to mirrorlist grabs.

James Antill james at fedoraproject.org
Tue Dec 8 18:26:39 UTC 2009


 Most of this looks awesome, although I'm still a bit scared. I don't
suppose you've tested against spacewalk have you ?:)

 Also...

On Tue, 2009-12-08 at 20:07 +0200, Ville Skyttä wrote:
> @@ -738,15 +734,6 @@ class YumRepository(Repository, config.RepoConf):
>          # if url is None do a grab via the mirror group/grab for the repo
>          # return the path to the local file
>  
> -        # Turn our dict into a list of 2-tuples
> -        headers = self.__headersListFromDict()
> -
> -        # We will always prefer to send no-cache.
> -        if not (cache or 'Pragma' in self.http_headers):
> -            headers.append(('Pragma', 'no-cache'))
> -
> -        headers = tuple(headers)
> -
>          # if copylocal isn't specified pickup the repo-defined attr
>          if copy_local is None:
>              copy_local = self.copy_local
> @@ -782,28 +769,15 @@ class YumRepository(Repository, config.RepoConf):
>                  verbose_logger.log(logginglevels.DEBUG_2, "Error getting package from media; falling back to url %s" %(e,))
>  
>          if url and scheme != "media":
> -            ug = URLGrabber(keepalive = self.keepalive,
> -                            bandwidth = self.bandwidth,
> -                            retry = self.retries,
> -                            throttle = self.throttle,
> -                            progress_obj = self.callback,
> +            ugopts = self._default_grabopts(cache=False) 

 This bit can't be right though, the last line needs to be:

+            ugopts = self._default_grabopts(cache=cache) 



More information about the Yum-devel mailing list