Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339713 - sys-apps/portage - "emerge -g" doesn't respect no_proxy variable
Summary: sys-apps/portage - "emerge -g" doesn't respect no_proxy variable
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 912589
  Show dependency tree
 
Reported: 2010-10-04 14:58 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2023-08-19 14:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-10-04 14:58:50 UTC
"emerge -g" doesn't respect no_proxy variable. I have the following in the system's environment:

# cat /etc/env.d/99own-stuff 
ftp_proxy="http-proxy.myhost.de:8080"
http_proxy="http-proxy.myhost.de:8080"
https_proxy="http-proxy.myhost.de:8080"
ANT_OPTS="-Dhttp.proxyHost=http-proxy.myhost.de -Dhttp.proxyPort=8080"
RSYNC_PROXY="http-proxy.myhost.de:8080"
no_proxy="anaconda.myhost.de"


and I want to fetch binpackages from the following host:

# grep BINHOST /etc/make.conf
PORTAGE_BINHOST="ftp://portage:secretpassword@anaconda.myhost.de/"

which is is the same subnet but "emerge -g" gives the following output:

# emerge -gqpv procps


!!! Error fetching binhost package info from 'ftp://portage:secretpassword@anaconda.myhost.de/'
!!! [Errno url error] invalid proxy for ftp: 'http-proxy.myhost.de:8080'


Fetching bininfo from ftp://portage:*password*@anaconda.myhost.de/
cache miss: '0' --- cache hit: '0'
[ebuild   R   ] sys-process/procps-3.2.8  USE="(-n32) unicode"


Removing ftp_proxy from env fixes the issue.


# emerge --info


!!! Error fetching binhost package info from 'ftp://portage:secretpassword@anaconda.myhost.de/'
!!! [Errno url error] invalid proxy for ftp: 'http-proxy.myhost.de:8080'


Fetching bininfo from ftp://portage:*password*@anaconda.myhost.de/
cache miss: '0' --- cache hit: '0'
Portage 2.1.8.3 (default/linux/amd64/10.0/server, gcc-4.4.3, glibc-2.11.2-r0, 2.6.32.23 x86_64)
=================================================================
System uname: Linux-2.6.32.23-x86_64-Intel-R-_Xeon-R-_CPU_E5320_@_1.86GHz-with-gentoo-1.12.13
Timestamp of tree: Mon, 04 Oct 2010 08:15:01 +0000
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.5-r3, 3.1.2-r4
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/adobe /etc/ati /etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --with-bdeps=y -g"
FEATURES="assume-digests collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://anaconda.myhost.de/gentoo-portage"
USE="amd64 berkdb bzip2 cli cracklib crypt cxx dri gdbm iconv mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre pppd readline reflection session slang snmp sse sse2 ssl sysfs truetype unicode xml xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Zac Medico gentoo-dev 2010-10-04 15:33:27 UTC
Apparently python's urlopen() function doesn't support no_proxy. I guess we can implement it somehow, maybe be temporarily overriding the other *_proxy environment variable for the current protocol. I found this doc that says how it's supposed to work:

  http://www.w3.org/Daemon/User/Proxies/ProxyClients.html
Comment 2 Zac Medico gentoo-dev 2010-11-01 23:32:08 UTC
According to the python documentation, no_proxy is supported:

  http://docs.python.org/library/urllib.html#urllib.urlopen

Maybe it's a formatting issue. You might try including the protocol.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-11-08 15:59:18 UTC
Including the protocol didn't help:

# echo $no_proxy
ftp://anaconda.myhost.de
# emerge -uDpqv world


!!! Error fetching binhost package info from 'ftp://portage:secretpassword@anaconda.myhost.de/'
!!! [Errno url error] invalid proxy for ftp: 'http-proxy.myhost.de:8080'


Fetching bininfo from ftp://portage:*password*@anaconda.myhost.de/
cache miss: '0' --- cache hit: '0'
[ebuild     U ] dev-lang/perl-5.12.2-r2 [5.12.2-r1] USE="berkdb -build -debug -doc gdbm -ithreads" 
[ebuild     U ] dev-perl/HTML-Parser-3.67 [3.64] USE="-test" 
[ebuild     U ] dev-perl/URI-1.55 [1.38]
[ebuild     U ] sys-apps/baselayout-1.12.14-r1 [1.12.13] USE="-bootstrap -build -static unicode" 

#
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-06-28 13:49:10 UTC
The company I work for has moved an we're no longer behind a proxy. So I cannot do tests regarding this bug anymore.
Comment 5 Zac Medico gentoo-dev 2020-09-08 00:08:21 UTC
*** Bug 740898 has been marked as a duplicate of this bug. ***