Skip to content

[action] [PR:13812] [Build] Remove the additional space character in the mirrors.list file#15474

Merged
mssonicbld merged 1 commit intosonic-net:202106from
mssonicbld:cherry/202106/13812
Jun 15, 2023
Merged

[action] [PR:13812] [Build] Remove the additional space character in the mirrors.list file#15474
mssonicbld merged 1 commit intosonic-net:202106from
mssonicbld:cherry/202106/13812

Conversation

@mssonicbld
Copy link
Collaborator

Why I did it

Fix all mirror is commented out in sources.list in slave image issue. It will have an issue when installing more packages in the slave container.

It will add additional space character after running add-apt-repository command.

For example:
The original config in /etc/apt/sources.list

#deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free

Run the following command:

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable"

Then the setting changed to: (added a new space character after #)

# deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free
Work item tracking
  • Microsoft ADO (number only): 24266883

How I did it

Fix the regex string to add the space pattern. After fixed, whether there is a space character or not, it will not be an issue.

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

sonic-net#13812)

Why I did it
Fix all mirror is commented out in sources.list in slave image issue. It will have an issue when installing more packages in the slave container.

It will add additional space character after running add-apt-repository command.

For example:
The original config in /etc/apt/sources.list

#deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free
Run the following command:

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable"
Then the setting changed to: (added a new space character after #)

# deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free
How I did it
Fix the regex string to add the space pattern. After fixed, whether there is a space character or not, it will not be an issue.

How to verify it
@mssonicbld
Copy link
Collaborator Author

Original PR: #13812

@mssonicbld mssonicbld merged commit 968852f into sonic-net:202106 Jun 15, 2023
@mssonicbld mssonicbld deleted the cherry/202106/13812 branch March 6, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants