-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
mdist: use git archive with git repositories for correctness #9210
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
Conversation
b8fbdb2 to
5461911
Compare
Codecov Report
@@ Coverage Diff @@
## master #9210 +/- ##
==========================================
- Coverage 66.82% 66.82% -0.01%
==========================================
Files 386 386
Lines 84834 84844 +10
Branches 17509 17507 -2
==========================================
+ Hits 56690 56696 +6
- Misses 23361 23365 +4
Partials 4783 4783
Continue to review full report at Codecov.
|
|
I've always wondered why we were not doing that and have been assuming @jpakkane had a reason. |
|
The lint_mypy failure is not actually my fault. @mensinda is there some way to automatically tell that open() doesn't take an encoding parameter because it's from the tarfile module, not the built-in function or io.open? |
|
@xclaesse the reason is "because submodules looked hard". :) |
|
Yes, there is. You can turn it of with a comment. We already use tarfile somewhere and it should be there on the same line.
Can't be more specific because I can't look it up right now.
On 2 September 2021 14:12:06 CEST, Eli Schwartz ***@***.***> wrote:
The lint_mypy failure is not actually my fault. @mensinda is there some way to automatically tell that open() doesn't take an encoding parameter because it's from the tarfile module, not the built-in function or io.open?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#9210 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
|
I was hoping for something slightly more "automatic", but I guess the manually manual way works too... |
|
@eli-schwartz fair enough. Note that we now also support dist for a subproject that is in the same git repo as its parent project. We're going to use that feature for GStreamer. IIRC I made a unit test for that, so CI should tell if that still works. |
|
Maybe that's the reason why CI fails in the "samerepo" setup... EDIT: yes I think it is. I changed the signature of copy_git no less than 4 times before committing, and I started off with args, not kwargs, so now for the subproject case only, I'm passing subdir= as revision= |
Probably that syntax: |
It's failing for the |
|
@eli-schwartz wow nice, didn't know git archive has a subdir parameter, that's exactly what we need for the release a subproject case. I think you got that part right already. However the --include-subprojects case is more tricky because it means adding files that are not tracker by git. I guess it means you need to do a local clone, copy subprojects excluding .git files, "git add" them, do the archive ? |
|
subprojects could themself have submodule... recursively... not sure that case ever worked tbh. |
Fixes various inconsistencies: - gitattributes is respected - export-subst - export-ignore - submodules with relative paths are not checked out relative to the local clone (which does not work anyway) - no need to manually remove gitfiles with inaccurate heuristics Fixes mesonbuild#2287 Fixes mesonbuild#3081 Fixes mesonbuild#8144
5461911 to
83f9157
Compare
And with that, |
I have a local configuration tag.forcesignannotated=true commit.gpgsign=true This causes the tests to fail with e.g. error: gpg failed to sign the data fatal: failed to write commit object Since this is a unittest, it is never wrong to tell git "just ignore prior configuration, and disable all PGP signing".
|
(I lied, I have local gitconfig which borks things up. Might as well add the changes I needed here too.) |
|
LGTM, seems to be a safer way indeed. |
Fixes various inconsistencies:
local clone (which does not work anyway)
Fixes #2287
Fixes #3081
Fixes #8144