-
Notifications
You must be signed in to change notification settings - Fork 93
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
flatpak-builder sometimes set up incorrectly submodules worktree #10
Comments
This:
Resolves to:
This is inside the build directory of the module, and it is mounted in the build. It is also bind-mounted in /run/build/ in order to produce builds that are more likely to be independent on the source location during the build. So, this should work. However, there is a detail here. What actually gets mounted is |
I believe that should fix it. |
From @mildred on October 18, 2016 10:16
By source dir, you mean the directory containing the sources? |
Hmm, I don't see how it shouldn't work then? Can you run "cat /proc/self/mounts" inside the build environment and see if /home/mildred/Projects/patchwork-electron is mounted? |
Did you ever figure out the exact difference between the two machines that made it not work? |
Unfortunally I also encounter this when packaging standardnotes: flatpak/flatpak-builder-tools#182 |
From @mildred on October 18, 2016 8:9
I have the same setup on two different computers, and one is not working as expected. I'm trying to package an electron-based app and I am inspiring myself from https://github.com/vrutkovs/flatpak-electron (I made almost no modifications to the json file and the Makefile patch)
The build command I have is :
flatpak-builder --repo=repo --subject="Patchwork Electron" --verbose app com.github.electron.json
At the moment the
make
command is called from flatpak-builder, I have the repositories that are incorrectly configured. There is a recursive submodule that points to a git repository outside of /run. Running git commands in this repository gives mixed results. For example I have:I debugged this, and could find that in that directory,
git rev-parse --is-inside-work-tree
results infalse
instead oftrue
.I could trace it back to the fact that in this directory, the
.git
says the repository is outside /run:And the repository config contains a relative directory to its worktree (because it's a submodule, this is normal) which resolves outside /run when joined with the repository real path:
I tried to remove the flatpak repository and the hidden
.flatpak-builder
directory, but it is always the same. On another computer with the same setup, I have no problem.I have flatpak version 0.6.11 on both on Arch and Fedora
edit : Removing the submodule working directories and running
git submodule update
in theMakefile
is a workaround. No network access should be required for that (the git repository is already there) but the worktree is recreated anew and correctly.Copied from original issue: flatpak/flatpak#353
The text was updated successfully, but these errors were encountered: