Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ $(shell \
SONIC_VERSION_CACHE_SOURCE=$(SONIC_VERSION_CACHE_SOURCE) \
DBGOPT='$(DBGOPT)' \
MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \
PIP_HTTP_TIMEOUT=$(PIP_HTTP_TIMEOUT) \
scripts/generate_buildinfo_config.sh)

# Generate the slave Dockerfile, and prepare build info for it
Expand Down Expand Up @@ -569,6 +570,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \
SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \
SONIC_OS_VERSION=$(SONIC_OS_VERSION) \
PIP_HTTP_TIMEOUT=$(PIP_HTTP_TIMEOUT) \
$(SONIC_OVERRIDE_BUILD_VARS)

.PHONY: sonic-slave-build sonic-slave-bash init reset
Expand All @@ -591,6 +593,7 @@ export MIRROR_URLS
export MIRROR_SECURITY_URLS
export MIRROR_SNAPSHOT
export SONIC_VERSION_CONTROL_COMPONENTS
export PIP_HTTP_TIMEOUT

%:: | sonic-build-hooks
ifneq ($(filter y, $(MULTIARCH_QEMU_ENVIRON) $(CROSS_BUILD_ENVIRON)),)
Expand Down
5 changes: 5 additions & 0 deletions rules/config
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,8 @@ GZ_COMPRESS_PROGRAM ?= gzip

# SONIC_OS_VERSION - sonic os version
SONIC_OS_VERSION ?= 11

# PIP timeout for http connection
# ex: pip3 --default-timeout 0.01 install xyz
PIP_HTTP_TIMEOUT ?= 0.01

1 change: 1 addition & 0 deletions scripts/generate_buildinfo_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ echo "export SONIC_VERSION_CACHE=${SONIC_VERSION_CACHE}" >> $BUILDINFO_CONFIG
echo "export SONIC_VERSION_CACHE_SOURCE=${SONIC_VERSION_CACHE_SOURCE}" >> $BUILDINFO_CONFIG
echo "export DISTRO=${DISTRO}" >> $BUILDINFO_CONFIG
echo "export MIRROR_SNAPSHOT=$MIRROR_SNAPSHOT" >> $BUILDINFO_CONFIG
echo "export PIP_HTTP_TIMEOUT=$PIP_HTTP_TIMEOUT" >> $BUILDINFO_CONFIG
2 changes: 1 addition & 1 deletion src/sonic-build-hooks/scripts/buildinfo_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ download_packages()

run_pip_command()
{
declare -a parameters=("$@")
declare -a parameters=("--default-timeout" "$PIP_HTTP_TIMEOUT" "$@")
PIP_CACHE_PATH=${PKG_CACHE_PATH}/pip
PKG_CACHE_OPTION="--cache-dir=${PIP_CACHE_PATH}"

Expand Down