diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2015-09-18 12:46:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-23 09:52:55 +0100 |
commit | 18309f08938cdbe4d1041488feee91507bcc50c1 (patch) | |
tree | 3beae25557ea5e4b704eacf494cce2bb06e5206b /scripts | |
parent | c035f3575b2df66f7068d5e73a361ec17a8aec98 (diff) | |
download | poky-18309f08938cdbe4d1041488feee91507bcc50c1.tar.gz |
oe-git-proxy: Correct the parsing of a port in $ALL_PROXY
Due to an error in the regular expression used to extract a port
number specified in $ALL_PROXY, rather than allowing the port number
to be followed by an optional "/", the port was required to be
followed by "/?".
This corrects the regular expression to allow an optional "/". It also
allows the odd "/?" suffix for backwards compatibility.
(From OE-Core rev: 39eb19e2ae9add58c763b71b54bdb3739041b2d0)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-git-proxy | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy index 24732829fb..b971c88ec5 100755 --- a/scripts/oe-git-proxy +++ b/scripts/oe-git-proxy | |||
@@ -113,7 +113,9 @@ done | |||
113 | # Proxy is necessary, determine protocol, server, and port | 113 | # Proxy is necessary, determine protocol, server, and port |
114 | PROTO=$(echo $ALL_PROXY | sed -e 's/\([^:]*\):\/\/.*/\1/') | 114 | PROTO=$(echo $ALL_PROXY | sed -e 's/\([^:]*\):\/\/.*/\1/') |
115 | PROXY=$(echo $ALL_PROXY | sed -e 's/.*:\/\/\([^:]*\).*/\1/') | 115 | PROXY=$(echo $ALL_PROXY | sed -e 's/.*:\/\/\([^:]*\).*/\1/') |
116 | PORT=$(echo $ALL_PROXY | sed -e 's/.*:\([0-9]*\)\/?$/\1/') | 116 | # For backwards compatibility, this allows the port number to be followed by /? |
117 | # in addition to the customary optional / | ||
118 | PORT=$(echo $ALL_PROXY | sed -e 's/.*:\([0-9]*\)\(\/?\?\)\?$/\1/') | ||
117 | if [ "$PORT" = "$ALL_PROXY" ]; then | 119 | if [ "$PORT" = "$ALL_PROXY" ]; then |
118 | PORT="" | 120 | PORT="" |
119 | fi | 121 | fi |