Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/pkg.mk: explicitly exclude state files #14299

Merged
merged 1 commit into from
Jun 16, 2020

Conversation

fjmolinas
Copy link
Contributor

@fjmolinas fjmolinas commented Jun 16, 2020

Contribution description

I recently upgraded to git 2.27 and for some reason how the state files was excluded does not work for me anymore which lead to patching to happen on every compile. Instead I used the explicit -e flag for this, which works for me 2.27 and in 2.17 (in docker).

Testing procedure

  • test in docker (git 2.17)

run 1

BUILD_IN_DOCKER=1 make -C examples/dtls-sock/ clean all
make: Entering directory '/home/francisco/workspace/RIOT/examples/dtls-sock'
Launching build container using image "riot/riotbuild:latest".
docker run --rm --tty --user $(id -u) -v '/usr/share/zoneinfo/Europe/Paris:/etc/localtime:ro' -v '/home/francisco/workspace/RIOT:/data/riotbuild/riotbase:delegated' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles'        -w '/data/riotbuild/riotbase/examples/dtls-sock/' 'riot/riotbuild:latest' make     all
Building application "dtls_sock" for "native" with MCU "native".

[INFO] updating tinydtls /data/riotbuild/riotbase/examples/dtls-sock/bin/pkg/native/tinydtls/.pkg-state.git-downloaded
echo 7a0420bfe3c041789cc0fe87822832f2fd12d0c3 > /data/riotbuild/riotbase/examples/dtls-sock/bin/pkg/native/tinydtls/.pkg-state.git-downloaded

run 2

BUILD_IN_DOCKER=1 make -C examples/dtls-sock/ all
make: Entering directory '/home/francisco/workspace/RIOT/examples/dtls-sock'
Launching build container using image "riot/riotbuild:latest".
docker run --rm --tty --user $(id -u) -v '/usr/share/zoneinfo/Europe/Paris:/etc/localtime:ro' -v '/home/francisco/workspace/RIOT:/data/riotbuild/riotbase:delegated' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles'        -w '/data/riotbuild/riotbase/examples/dtls-sock/' 'riot/riotbuild:latest' make     all
Building application "dtls_sock" for "native" with MCU "native".

make[1]: Nothing to be done for 'prepare'.
"make" -C /data/riotbuild/riotbase/pkg/tinydtls
"make" -C /data/riotbuild/riotbase/examples/dtls-sock/bin/pkg/native/tinydtls -f /data/riotbuild/riotbase/examples/dtls-sock/bin/pkg/native/tinydtls/Makefile.riot
  • test with git 2.27

run 1

make -C examples/dtls-sock/ clean all
make: Entering directory '/home/francisco/workspace/RIOT/examples/dtls-sock'
Building application "dtls_sock" for "native" with MCU "native".

[INFO] updating tinydtls /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls/.pkg-state.git-downloaded
echo 7a0420bfe3c041789cc0fe87822832f2fd12d0c3 > /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls/.pkg-state.git-downloaded
[INFO] patch tinydtls
"make" -C /home/francisco/workspace/RIOT/pkg/tinydtls
"make" -C /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls -f /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls/Makefile.riot

run 2

make -C examples/dtls-sock/ all
make: Entering directory '/home/francisco/workspace/RIOT/examples/dtls-sock'
Building application "dtls_sock" for "native" with MCU "native".

make[1]: Nothing to be done for 'prepare'.
"make" -C /home/francisco/workspace/RIOT/pkg/tinydtls
"make" -C /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls -f /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls/Makefile.riot
"make" -C /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls/aes -f /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls/aes/Makefile.riot
"make" -C /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls/ecc -f /home/francisco/workspace/RIOT/examples/dtls-sock/bin/pkg/native/tinydtls/ecc/Makefile.riot
"make" -C /home/francisco/workspace/RIOT/boards/native
"make" -C /home/francisco/workspace/RIOT/boards/native/driver

Issues/PRs references

@fjmolinas fjmolinas added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Jun 16, 2020
@fjmolinas fjmolinas requested review from kaspar030 and aabadie June 16, 2020 14:49
@fjmolinas fjmolinas added Area: build system Area: Build system Area: pkg Area: External package ports labels Jun 16, 2020
@fjmolinas
Copy link
Contributor Author

I don't really understand why one option does not work anymore.

@aabadie
Copy link
Contributor

aabadie commented Jun 16, 2020

This PR doesn't make any difference with my version of git (2.25.1).

@aabadie
Copy link
Contributor

aabadie commented Jun 16, 2020

I don't really understand why one option does not work anymore.

Maybe the support was dropped. We could check at git changelogs.

@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 16, 2020
@aabadie aabadie self-assigned this Jun 16, 2020
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no regression in this PR and I find the usage of git clean more clear with the -e option to exclude a list of files.

ACK

@aabadie aabadie merged commit 4b087a7 into RIOT-OS:master Jun 16, 2020
@miri64 miri64 added this to the Release 2020.07 milestone Jun 24, 2020
@fjmolinas fjmolinas deleted the pr_pkg_git_patch branch July 31, 2020 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants