Skip to content

[action] [PR:28144] [build] Stop installing python3-regex via apt to avoid pip uninstall-no-record-file failure#28182

Merged
mssonicbld merged 1 commit into
sonic-net:202605from
mssonicbld:cherry/202605/28144
Jul 1, 2026
Merged

[action] [PR:28144] [build] Stop installing python3-regex via apt to avoid pip uninstall-no-record-file failure#28182
mssonicbld merged 1 commit into
sonic-net:202605from
mssonicbld:cherry/202605/28144

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator

Why I did it

target/python-wheels/trixie/sonic_utilities-1.2-py3-none-any.whl-install and sonic-marvell-prestera-armhf.bin started failing during the sonic-utilities wheel install with:

Cannot uninstall regex 2024.11.6
╰─> The package's contents are unknown: no RECORD file was found for regex.

 hint: The package was installed by debian. You should check if it can uninstall the package.

sonic-slave-trixie and sonic_debian_extension installed python3-regex from debian apt repo in dist-packages folder without a pip RECORD file, so pip cannot uninstall it later.
When the sonic-utilities wheel pulls in a newer regex - currently triggered by sonic-utilities -> docker-image-py (the unbounded docker-image-py>=0.1.10 dependency now resolves to 0.2.0, published 2026-06-29, which requires regex>=2026.6.28) - pip failed on uninstall-no-record-file.

Work item tracking
  • Microsoft ADO (number only):

How I did it

  • removed python3-regex from sonic-slave-trixie/Dockerfile.j2
  • remove python3-regex from sonic_debian_extension.j2

How to verify it

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

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

Signed-off-by: Sonic Build Admin sonicbld@microsoft.com

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

…no-record-file failure

<!--
     Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

     ** Make sure all your commits include a signature generated with `git commit -s` **

     If this is a bug fix, make sure your description includes "fixes #xxxx", or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it
`target/python-wheels/trixie/sonic_utilities-1.2-py3-none-any.whl-install` and `sonic-marvell-prestera-armhf.bin` started failing during the `sonic-utilities` wheel install with:
```
Cannot uninstall regex 2024.11.6
╰─> The package's contents are unknown: no RECORD file was found for regex.

 hint: The package was installed by debian. You should check if it can uninstall the package.
```
`sonic-slave-trixie` and `sonic_debian_extension` installed `python3-regex` from debian apt repo in dist-packages folder without a pip RECORD file, so pip cannot uninstall it later.
When the sonic-utilities wheel pulls in a newer regex - currently triggered by sonic-utilities -> docker-image-py (the unbounded `docker-image-py>=0.1.10` dependency now resolves to `0.2.0`, published 2026-06-29, which requires `regex>=2026.6.28`) - pip failed on `uninstall-no-record-file`.
##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it
- removed `python3-regex` from `sonic-slave-trixie/Dockerfile.j2`
- remove `python3-regex` from `sonic_debian_extension.j2`
#### How to verify it

<!--
If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012.
-->

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

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [ ] 202512
- [ ] 202605
- [ ] 202608

#### Tested branch (Please provide the tested image version)

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in 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
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>

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

Copy link
Copy Markdown
Collaborator Author

Original PR: #28144

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
mssonicbld merged commit eaf24f4 into sonic-net:202605 Jul 1, 2026
29 checks passed
xdqi pushed a commit to canonical/sonic-buildimage that referenced this pull request Jul 6, 2026
…no-record-file failure (sonic-net#28182)

<!--
 Please make sure you've read and understood our contributing guidelines:
 https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

 CODE_OF_CONDUCT.md LICENSE README.md SECURITY.md SUPPORT.md azure-pipelines failure_prs.log scripts skip_prs.log Make sure all your commits include a signature generated with `git commit -s` **

 If this is a bug fix, make sure your description includes "fixes #xxxx", or
 "closes #xxxx" or "resolves #xxxx"

 Please provide the following information:
-->

#### Why I did it
`target/python-wheels/trixie/sonic_utilities-1.2-py3-none-any.whl-install` and `sonic-marvell-prestera-armhf.bin` started failing during the `sonic-utilities` wheel install with:
```
Cannot uninstall regex 2024.11.6
╰─> The package's contents are unknown: no RECORD file was found for regex.

 hint: The package was installed by debian. You should check if it can uninstall the package.
```
`sonic-slave-trixie` and `sonic_debian_extension` installed `python3-regex` from debian apt repo in dist-packages folder without a pip RECORD file, so pip cannot uninstall it later.
When the sonic-utilities wheel pulls in a newer regex - currently triggered by sonic-utilities -> docker-image-py (the unbounded `docker-image-py>=0.1.10` dependency now resolves to `0.2.0`, published 2026-06-29, which requires `regex>=2026.6.28`) - pip failed on `uninstall-no-record-file`.
##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it
- removed `python3-regex` from `sonic-slave-trixie/Dockerfile.j2`
- remove `python3-regex` from `sonic_debian_extension.j2`
#### How to verify it

<!--
If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012.
-->

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

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [ ] 202512
- [ ] 202605
- [ ] 202608

#### Tested branch (Please provide the tested image version)

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in 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
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>

#### A picture of a cute animal (not mandatory but encouraged)
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.

1 participant