https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225434

            Bug ID: 225434
           Summary: [patch] Treat set but empty environment variables as
                    unset in /usr/libexec/phttpget
           Product: Base System
           Version: 11.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: v...@freebsd.org
          Keywords: patch

Created attachment 190037
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=190037&action=edit
patch to treat set-to-empty environment variables as not-set

If http_proxy is set to an empty string in the environment of portsnap, then
this is propagated to /usr/libexec/phttpget (which is used by portsnap) and
this tool then fails, but the error is silenced and ignored by portsnap,
leading to "metadata corrupt" error down the execution of portsnap:

root# portsnap --debug --interactive fetch
...
Fetching 5 metadata files...
/usr/libexec/phttpget ec2-eu-west-1.portsnap.freebsd.org f/34c6...
phttpget: host = , port = 3128: hostname nor servname provided, or not known
Verifying 34c6... /usr/sbin/portsnap: cannot open 34c6....gz: No such file or
directory
metadata is corrupt.

The mailing lists and forums are littered with similar reports, for example:
https://forums.freebsd.org/threads/901/page-2

A shell script may contain http_proxy=${http_proxy:-""} in which case
http_proxy will be set to an empty string and phttpget should treat that as if
the variable is not set (no proxy provided).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to