[Yum-devel] [PATCH 1/2] Store downloaded packages in a temp. dir. (non-root is happy, and clenaup is done for us).

Tim Lauridsen tim.lauridsen at googlemail.com
Wed Dec 23 08:52:07 UTC 2009


On Tue, Dec 22, 2009 at 10:18 PM, James Antill <james at and.org> wrote:

> ---
>  yum/packages.py |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/yum/packages.py b/yum/packages.py
> index 2ed09c8..3455fab 100644
> --- a/yum/packages.py
> +++ b/yum/packages.py
> @@ -1755,7 +1755,10 @@ class YumUrlPackage(YumLocalPackage):
>                     pd = repo.proxy_dict
>                     break
>             fname = os.path.basename(url)
> -            local = "%s/%s" % (yb.conf.cachedir, fname)
> +            local = misc.getCacheDir()
> +            if local is None: # bugger...
> +                local = "%s/../" % repo.cachedir
> +            local = "%s/%s" % (local, fname)
>             try:
>                 ug = URLGrabber(bandwidth = yb.conf.bandwidth,
>                                 retry = yb.conf.retries,
> --
> 1.6.5.2
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
>

ACK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20091223/701b9c7a/attachment.htm>


More information about the Yum-devel mailing list