[svn] r5135 - trunk/tools/mrepo
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Fri Feb 2 13:29:54 CET 2007
Author: dag
Date: 2007-02-02 13:29:53 +0100 (Fri, 02 Feb 2007)
New Revision: 5135
Modified:
trunk/tools/mrepo/ChangeLog
trunk/tools/mrepo/gensystemid
Log:
gensystemid now uses proxy environment variables.
Modified: trunk/tools/mrepo/ChangeLog
===================================================================
--- trunk/tools/mrepo/ChangeLog 2007-02-02 07:29:22 UTC (rev 5134)
+++ trunk/tools/mrepo/ChangeLog 2007-02-02 12:29:53 UTC (rev 5135)
@@ -3,6 +3,7 @@
- Added promoteepoch directive to disable it for older distributions (rhel2.1, rh7.3)
- Fixed a problem with the disabled directive (disabled = no was ignored)
- Cleaned up mrepo-example.conf (Gareth Armstrong)
+- gensystemid now uses proxy environment variables
* 0.8.4 - Sint-Jacobsplein - released 13/12/2006
- Renamed Yam to mrepo (Matthew Hannigan)
Modified: trunk/tools/mrepo/gensystemid
===================================================================
--- trunk/tools/mrepo/gensystemid 2007-02-02 07:29:22 UTC (rev 5134)
+++ trunk/tools/mrepo/gensystemid 2007-02-02 12:29:53 UTC (rev 5135)
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import os, sys, getopt, getpass
+import os, sys, getopt, getpass, urlpass
sys.path.insert(0, "/usr/share/rhn/")
sys.path.insert(1,"/usr/share/rhn/up2date_client")
@@ -190,6 +190,23 @@
else:
cfg['logFile'] = os.path.expanduser('~/up2date.log')
+ ### Get proxy information from environment and set up2date config accordingly
+ proxy = None
+ if os.environ.has_key('http_proxy'):
+ t, proxy, t, t, t, t = urlparse.urlparse(os.environ['http_proxy'])
+ elif os.environ.has_key('https_proxy'):
+ t, proxy, t, t, t, t = urlparse.urlparse(os.environ['https_proxy'])
+ if proxy:
+ cfg['enableProxy'] = 1
+ cfg['httpProxy'] = proxy
+ info(4, 'Setting proxy to %s' % proxy)
+ ### FIXME: Implement proxy authentication
+# if proxy.username and proxy.password:
+# cfg['enableProxyAuth'] = 1
+# cfg['proxyPassword'] = proxy.password
+# cfg['proxyUser='] = proxy.username
+
+
if op.verbose >= 5:
cfg['debug'] = 10000
More information about the svn-commits
mailing list