[Bug][Build]: fix the file not found issue caused by the relative path (#9450)
#### Why I did it Merged from master branch: https://github.com/Azure/sonic-buildimage/pull/9443 Fix the nodesource.list cannot read issue, it is cased by the full path not used. ``` 2021-12-03T06:59:26.0019306Z Removing intermediate container 77cfe980cd36 2021-12-03T06:59:26.0020872Z ---> 528fd40e60f6 2021-12-03T06:59:26.0021457Z Step 81/81 : RUN post_run_buildinfo 2021-12-03T06:59:26.0841136Z ---> Running in d804bd7e1b06 2021-12-03T06:59:29.1626594Z [91mDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. 2021-12-03T06:59:34.2960105Z [0m[91m/usr/bin/sed: can't read nodesource.list: No such file or directory 2021-12-03T06:59:34.5094880Z [0mThe command '/bin/sh -c post_run_buildinfo' returned a non-zero code: 2 ```
This commit is contained in:
parent
f93d1f64a2
commit
6a6512246d
@ -21,6 +21,7 @@ pr:
|
||||
- sonic-slave-jessie
|
||||
- sonic-slave-stretch
|
||||
- sonic-slave-buster
|
||||
- src/sonic-build-hooks
|
||||
|
||||
parameters:
|
||||
- name: 'arches'
|
||||
|
@ -70,7 +70,7 @@ set_reproducible_mirrors()
|
||||
expression="s/^deb.*$REPR_MIRROR_URL_PATTERN/#\0/"
|
||||
fi
|
||||
|
||||
local mirrors="/etc/apt/sources.list $(ls /etc/apt/sources.list.d/)"
|
||||
local mirrors="/etc/apt/sources.list $(find /etc/apt/sources.list.d/ -type f)"
|
||||
for mirror in $mirrors; do
|
||||
sed -i "$expression" "$mirror"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user