On 3/27/07, Andrew Fyfe <andrew@neptune-one.net> wrote:
Ooops ignore the last email wrong patch, here's the correct patch.
Andrew
Andrew Fyfe wrote:
Aaron Griffin wrote:
On 3/26/07, Gustavo Chain <g@vtr.net> wrote:
Hi all!
Dont' you think that makepkg should use ProxySettings from pacman.conf. ?
What dou you think about ?
makepkg uses wget, which should (last I checked) honor the typical "http_proxy" and "ftp_proxy" environment variables.
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
Here's a modified version of Gustavo Chain's patch, it moves the loading of the proxy settings outside of the for loop (so it doesn't load for every file in the source array), and a modified command to get the ProxyServer setting.
Andrew
------------------------------------------------------------------------
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
--- upstream/scripts/makepkg.old 2007-03-27 13:39:32.000000000 +0100 +++ upstream/scripts/makepkg 2007-03-27 13:48:34.000000000 +0100 @@ -663,6 +663,14 @@ msg "Retrieving Sources..." mkdir -p src cd "$startdir/src" + +PROXY_SERVER="$(grep -E '^ProxyServer *=' /etc/pacman.conf | \ + sed 's#^ProxyServer[\t ]*=[\t ]*\([A-Za-z0-9./:-]*\).*#\1#')" +if [ -n "$PROXY_SERVER" ]; then + export http_proxy="$PROXY" + export ftp_proxy="$PROXY" +fi + for netfile in ${source[@]}; do file=$(strip_url "$netfile") if [ -f "../$file" ]; then
The only problem with these patches is that "ProxyServer" is not a valid pacman.cond setting, so there's no reason to put that setting there for makepkg. Both honor environment variables that should be set in some sort of profile.d script.