[packagekit] [PATCH] set packagekitd proxy environment variables

Zhang, Qiang Z qiang.z.zhang at intel.com
Mon Sep 13 01:46:43 PDT 2010


>Proxy is a per-user definition, rather than per-system. I guess this
>distinction isn't important on meego so much, but it certainly is on
>the desktop. PackageKit goes to great pains to preserve the per-user
>proxy data, even for multiply logged in users. As such, it's wrong to
>set this environment variable in the engine, as this will be cleared
>as soon as user proxy data is set.
[Zhang, Qiang] Right, it's not safe for multiply logged in users. 
But for MeeGo, hope these instances may not be occurred much. 
>
>The correct way to do this would be to use pk_backend_get_proxy_http()
>in the zypp backend transaction function start or _init() function,
>and use a zypp_set_proxy_http() type function. Relying on a
>environment variable being propagated kinda sucks from a library
>design point of view, if I'm being honest. 
[Zhang, Qiang] Transfer proxy info to libzypp from zypp backend is very complicated, and zypp have not provided the interface to set proxy. In fact, zypp drop the proxy issue to curl, which only get proxy from environment variable.
>But, from a "getting it
>working" point of view, certainly setting the http_proxy environment
>variable in the zypp backend is a fairly good way to solve this.
[Zhang, Qiang] thanks, the proxy issue has been opened for a long time, and we use this way to fix it currently.
>
>I hope that helps.

Thanks for your comments :)
-xiaoqiang

>
>Richard.



More information about the PackageKit mailing list