Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APT_PROXY empty value #10

Closed
Lesik opened this issue Jun 30, 2017 · 4 comments
Closed

APT_PROXY empty value #10

Lesik opened this issue Jun 30, 2017 · 4 comments

Comments

@Lesik
Copy link

Lesik commented Jun 30, 2017

Hey,

I use no proxy to connect to the internet, and according to the README the proxy is unset by default. However, 10-bootstrap.sh still fails:

+ http_proxy=localhost:3142 debootstrap --arch=arm64 [...]
I: Retrieving InRelease 
I: Retrieving Release 
E: Failed getting release file http://ftp.debian.org/debian/dists/stretch/Release

Notice the http_proxy being set. So I try to overwrite the proxy by setting APT_PROXY="", but that doesn't help either, because of this line:

APT_PROXY=${APT_PROXY:="localhost:3142"}

If APT_PROXY is set but empty, it will be still set to localhost:3142. Check out this simplified example:

$ myvar=""
$ othervar=${myvar:="notempty"}
$ echo $othervar
notempty
@nwildner
Copy link

Maybe this proxy variable is enforced cause the instructions suggest you to install apt-cache-ng

https://github.com/michaelfranzl/rpi23-gen-image#set-up-caching-for-apt

It is zero configuration as this readme states. Install apt-proxy-ng to make localcache of all packages downloaded, so you dont have get all again whenever you need to create a new image,.

@Lesik
Copy link
Author

Lesik commented Jun 30, 2017

Yes, I read the README. But I do not want to use apt-cache-ng.

And this line:

APT_PROXY=""

seems to suggest that if I leave the variable empty, the default value will be "".

@paulghill
Copy link

Edit the rpi23-gen-image.sh and look for APT_PROXY and change it to as follows: APT_PROXY=${APT_PROXY:=""}

@Lesik
Copy link
Author

Lesik commented Jul 10, 2017

I fixed this for myself the second I found the bug. The point of this bug report is that it's fixed for others who may not want/be able to read (ba)sh.

michaelfranzl pushed a commit that referenced this issue Oct 29, 2017
…g the script. Updated README and example.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants