[issue123] smart can't use proxy

Zach Garner at Labix Tracker tracker at labix.org
Mon Feb 20 05:56:03 PST 2006


Zach Garner <zach at awarix.com> added the comment:

OK, I've performed some more testing, and it seems that FTP Proxying
via curl with smart works for me. Note that I don't have a real ftp
proxy, but I believe this fake information shows that FTP proxying
should work. I know for certain that HTTP and HTTPS proxying works for
me, as I've mentioned before.

--------------------------------------------------------------------------------------------

[zgarner at test1.emap] 387 export FTP_PROXY=http://somerandomhost.com
[zgarner at test1.emap] 388 sudo smart update
Loading cache...
Updating cache...                                            
#####################################################################################
[100%]

Fetching information for 'Production'...
-> ftp://ops.awarix.com/repository/production/1-awarix/base/release
release                                                               

      [  0%]
error: Failed acquiring information for 'Production':
error: ftp://ops.awarix.com/repository/production/1-awarix/base/release:
Couldn't resolve proxy 'somerandomhost.com'

--------------------------------------------------------------------------------------------

I am using a slightly modified (mostly to fix 'upgrade' bugs) build of
smart on a SuSE Enterprise 9 system.

I'm not sure how to help you further with this, since I cannot
reproduce the problem. Maybe some of the official Smart developers can
help you further.

If you are desperate however, you could edit 'smart/fetcher.py',
around line 1619, in the PyCurlHandler class. Add something like:
      proxyfile = "/etc/smart/proxy";
      if os.path.isfile(proxyfile):
          handle.setopt(pycurl.CURLOPT_PROXY, os.open(proxyfile).readline));

"pycurl.CURLOPT_PROXY" is equivalent to the "--proxy" option when
running curl. This would manually set the proxy for smart/curl to the
first line of "/etc/smart/proxy", if it exists. It probably wouldn't
be a bad idea to print out a debug statement to ensure that the
PyCurlHandler is actually being used.

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue123>
_______________________________________



More information about the Smart mailing list