[packagekit] [PATCH] set packagekitd proxy environment variables

Zhang, Qiang Z qiang.z.zhang at intel.com
Sun Sep 12 21:23:27 PDT 2010


Some backends may have not provided the interface to accept proxy, such as zypp, so this patch can give a way to use proxy in easy way.

-Thanks
-Xiaoqiang


>-----Original Message-----
>From: Zhang, Qiang Z
>Sent: 2010年9月13日 12:33
>To: packagekit at lists.freedesktop.org; michael.meeks at novell.com;
>hughsient at gmail.com
>Cc: Nashif, Anas; Zhu, Peter J; Liu, Kent; Zhang, Qiang Z; xiaoqiang
>Subject: [PATCH] set packagekitd proxy environment variables
>
>From: xiaoqiang <xiaoqiang at xq-desktop.(none)>
>
>set proxy environment variables which can be used by backend libraries,
>such as zypp->curl, which have not any interface to accpet proxy info.
>With out this patch zypp backend can't work proxy.
>
>Related meego bug: http://bugs.meego.com/show_bug.cgi?id=746
>---
> src/pk-engine.c |    6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
>diff --git a/src/pk-engine.c b/src/pk-engine.c
>index 0f7c410..abd22a2 100644
>--- a/src/pk-engine.c
>+++ b/src/pk-engine.c
>@@ -910,6 +910,12 @@ pk_engine_set_proxy (PkEngine *engine, const gchar
>*proxy_http, const gchar *pro
> 		goto out;
> 	}
>
>+	/*set proxy environment variables which can be used by backend libraries,
>such as zypp->curl*/
>+	if (proxy_http != NULL)
>+		g_setenv ("http_proxy", proxy_http, TRUE);
>+	if (proxy_ftp != NULL)
>+		g_setenv ("ftp_proxy", proxy_ftp, TRUE);
>+
> 	/* save sender */
> 	sender = dbus_g_method_get_sender (context);
>
>--
>1.7.2.2



More information about the PackageKit mailing list