Skip to content

Commit 9cbd4dd

Browse files
authored
[Build] Remove the additional space character in the mirrors.list file (#13812) (#13904)
1 parent 638fdd0 commit 9cbd4dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sonic-build-hooks/scripts/buildinfo_base.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ check_if_url_exist()
7171
set_reproducible_mirrors()
7272
{
7373
# Remove the charater # in front of the line if matched
74-
local expression="s/^#\(.*$REPR_MIRROR_URL_PATTERN\)/\1/"
74+
local expression="s/^#\s*\(.*$REPR_MIRROR_URL_PATTERN\)/\1/"
7575
# Add the character # in front of the line, if not match the URL pattern condition
7676
local expression2="/^#*deb.*$REPR_MIRROR_URL_PATTERN/! s/^#*deb/#&/"
7777
local expression3="\$a#SET_REPR_MIRRORS"
7878
if [ "$1" = "-d" ]; then
7979
# Add the charater # in front of the line if match
8080
expression="s/^deb.*$REPR_MIRROR_URL_PATTERN/#\0/"
8181
# Remove the character # in front of the line, if not match the URL pattern condition
82-
expression2="/^#*deb.*$REPR_MIRROR_URL_PATTERN/! s/^#(#*deb)/\1/"
82+
expression2="/^#*deb.*$REPR_MIRROR_URL_PATTERN/! s/^#\s*(#*deb)/\1/"
8383
expression3="/#SET_REPR_MIRRORS/d"
8484
fi
8585

0 commit comments

Comments
 (0)