Skip to content

[build]: Add missing 'rm -rf' to component Makefiles for clean rebuild#3028

Merged
lguohan merged 1 commit intosonic-net:masterfrom
gpaussabrcm:fix_clean_rebuild
Jun 19, 2019
Merged

[build]: Add missing 'rm -rf' to component Makefiles for clean rebuild#3028
lguohan merged 1 commit intosonic-net:masterfrom
gpaussabrcm:fix_clean_rebuild

Conversation

@gpaussabrcm
Copy link
Contributor

  • src/iproute2/Makefile
  • src/python3/Makefile

These Makefiles do not properly clean out the src build subdirectory
prior to downloading the source code contents. This causes an error
during a rebuild following a 'make clean'.

Signed-off-by: Greg Paussa [email protected]

- What I did
Fixed a problem with doing a rebuild from a SONiC local clone following a 'make clean'. The following is a typical error that occurs in this scenario:

dpkg-source: error: unpack target exists: python3.6-3.6.0
dpkg-source: info: extracting python3.6 in python3.6-3.6.0
Makefile:18: recipe for target '/sonic/target/debs/stretch/libpython3.6-minimal_3.6.0-1_amd64.deb' failed
make[1]: *** [/sonic/target/debs/stretch/libpython3.6-minimal_3.6.0-1_amd64.deb] Error 255
make[1]: Leaving directory '/sonic/src/python3'

- How I did it
Added the missing 'rm -rf' command to the src/iproute2 and src/python3 Makefiles. All other non-submodule component Makefiles follow a similar pattern, namely they remove their entire build subdirectory prior to fetching their source code contents (wget, git clone, etc.) so that the build can start from a clean slate. There were three components that did not first remove their source build subdirectory, causing a build error on a subsequent rebuild following a 'make clean'. Of these, the src/lldpd/Makefile was fixed in a previous commit 1e3b62fe. This PR covers the remaining two that were found by visual inspection of the Makefiles.

- How to verify it
This is typically seen when doing a rebuild following a previous build. Assuming 'make init' and 'make configure' have already been done, this sequence exposes the python3 build error (shown above) for the broadcom platform:

make target/sonic-broadcom.bin
make clean
make target/sonic-broadcom.bin

A more direct way to observe the issue is:

make target/sonic-broadcom.bin
make target/debs/stretch/libpython3.6-minimal_3.6.0-1_amd64.deb-clean
make target/debs/stretch/libpython3.6-minimal_3.6.0-1_amd64.deb

- Description for the changelog

Add missing 'rm -rf' command to src/iproute2/Makefile and src/python3/Makefile to allow clean rebuild.

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

* src/iproute2/Makefile
* src/python3/Makefile

These Makefiles do not properly clean out the src build subdirectory
prior to downloading the source code contents. This causes an error
during a rebuild following a 'make clean'.

Signed-off-by: Greg Paussa <[email protected]>
@msftclas
Copy link

msftclas commented Jun 18, 2019

CLA assistant check
All CLA requirements met.

@jleveque
Copy link
Contributor

Retest vs please

@lguohan
Copy link
Collaborator

lguohan commented Jun 19, 2019

thanks!

@lguohan lguohan merged commit c67c29f into sonic-net:master Jun 19, 2019
lguohan pushed a commit that referenced this pull request Jun 19, 2019
#3028)

* src/iproute2/Makefile
* src/python3/Makefile

These Makefiles do not properly clean out the src build subdirectory
prior to downloading the source code contents. This causes an error
during a rebuild following a 'make clean'.

Signed-off-by: Greg Paussa <[email protected]>
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request Feb 9, 2021
sonic-net#3028)

* src/iproute2/Makefile
* src/python3/Makefile

These Makefiles do not properly clean out the src build subdirectory
prior to downloading the source code contents. This causes an error
during a rebuild following a 'make clean'.

Signed-off-by: Greg Paussa <[email protected]>
mssonicbld added a commit that referenced this pull request Nov 15, 2023
…atically (#17173)

#### Why I did it
src/sonic-utilities
```
* 3609e417 - (HEAD -> 202305, origin/202305) [sonic-package-manager] do not modify config_db.json (#3032) (2 hours ago) [Stepan Blyshchak]
* 354dfe80 - [sonic_installer]: Improve exception handling: introduce notes. (#3028) (3 hours ago) [Nazarii Hnydyn]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit that referenced this pull request Feb 8, 2024
…lly (#18070)

#### Why I did it
src/sonic-swss
```
* b3b6a83 - (HEAD -> master, origin/master, origin/HEAD) [test_mux] Multi-mux-nh full test coverage (#3028) (25 minutes ago) [Nikola Dancejic]
* 3bd0144 - Bfd support for TSA state. (#2926) (6 hours ago) [siqbal1986]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

4 participants