Discussion:
aptitude upgrade through proxy
(too old to reply)
Javier Vasquez
2007-10-25 03:00:13 UTC
Permalink
Hi,

I've used http_proxy/ftp_proxy to enable apt-get to download packages
through a proxy server whenever required.

However I've tried the same environment variables with aptitude with
no luck... Looks like aptitude doesn't pay attention to them. Does
any one know how to overcome this? Also, I liked the environment
variables solution because it can be temporally enabled/disabled,
without having to edit a config file everytime one wants to change...
I've tried looking in the man page, but didn't find anything...

Thanks,
--
Javier
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Kumar Appaiah
2007-10-25 03:20:09 UTC
Permalink
Post by Javier Vasquez
However I've tried the same environment variables with aptitude with
no luck... Looks like aptitude doesn't pay attention to them. Does
any one know how to overcome this? Also, I liked the environment
variables solution because it can be temporally enabled/disabled,
without having to edit a config file everytime one wants to change...
I've tried looking in the man page, but didn't find anything...
Try adding this to /etc/apt/apt.conf:

Acquire {
// HTTP method configuration
http {
Proxy "http://<myproxy>:<port>";
};
};

HTH.

Kumar
--
Kumar Appaiah,
458, Jamuna Hostel,
Indian Institute of Technology Madras,
Chennai - 600 036
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Kelly Clowers
2007-10-25 05:10:07 UTC
Permalink
Post by Javier Vasquez
Hi,
I've used http_proxy/ftp_proxy to enable apt-get to download packages
through a proxy server whenever required.
However I've tried the same environment variables with aptitude with
no luck... Looks like aptitude doesn't pay attention to them. Does
any one know how to overcome this? Also, I liked the environment
variables solution because it can be temporally enabled/disabled,
without having to edit a config file everytime one wants to change...
I've tried looking in the man page, but didn't find anything...
That's strange, I have used aptitude with http_proxy and not had
any problems.

I don't have any good ideas to try, unfortunately.


Cheers,
Kelly
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Daniel Burrows
2007-10-25 15:20:07 UTC
Permalink
Post by Javier Vasquez
I've used http_proxy/ftp_proxy to enable apt-get to download packages
through a proxy server whenever required.
However I've tried the same environment variables with aptitude with
no luck... Looks like aptitude doesn't pay attention to them. Does
any one know how to overcome this? Also, I liked the environment
variables solution because it can be temporally enabled/disabled,
without having to edit a config file everytime one wants to change...
I've tried looking in the man page, but didn't find anything...
How are you running aptitude and apt-get (command-lines)? In particular,
are you running aptitude as a user and then automatically su-ing to root?
I wouldn't be 100% confident that this preserves environment variables.

Other than that, I'm not sure what could be happening: aptitude
doesn't clear out the environment, and the code that reads http_proxy is
used in both aptitude and apt-get.

Daniel
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Javier Vasquez
2007-10-25 17:00:21 UTC
Permalink
Post by Daniel Burrows
Post by Javier Vasquez
I've used http_proxy/ftp_proxy to enable apt-get to download packages
through a proxy server whenever required.
However I've tried the same environment variables with aptitude with
no luck... Looks like aptitude doesn't pay attention to them. Does
any one know how to overcome this? Also, I liked the environment
variables solution because it can be temporally enabled/disabled,
without having to edit a config file everytime one wants to change...
I've tried looking in the man page, but didn't find anything...
How are you running aptitude and apt-get (command-lines)? In particular,
are you running aptitude as a user and then automatically su-ing to root?
I wouldn't be 100% confident that this preserves environment variables.
Other than that, I'm not sure what could be happening: aptitude
doesn't clear out the environment, and the code that reads http_proxy is
used in both aptitude and apt-get.
Daniel
When I configure apt.conf.d/proxy, then things work... I use apt-get
and aptitude with sudo as a non root user. Might be the the
environment variables are lost with sudo? I don't recall if when I
used apt-get with the environment variables I did it so under root and
not with sudo. I can't tell... I'd prefer using environment
variables, just to avoid overwriting configuration file every time...

Thanks a lot,
--
Javier
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Sven Joachim
2007-10-25 19:30:14 UTC
Permalink
Post by Javier Vasquez
When I configure apt.conf.d/proxy, then things work... I use apt-get
and aptitude with sudo as a non root user. Might be the the
environment variables are lost with sudo?
Exactly that. If you want to preserve them, you should add a line
with

Defaults !env_reset

or modify existing lines. Note that this may be a security problem
on multi-user systems where people are supposed to only have limited
access to sudo, but on your home PC you probably don't care.

Cheers,
Sven
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Loading...