{"action":"created","issue":{"url":"https://api.github.com/repos/flatpak/flatpak-builder/issues/10","repository_url":"https://api.github.com/repos/flatpak/flatpak-builder","labels_url":"https://api.github.com/repos/flatpak/flatpak-builder/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/flatpak/flatpak-builder/issues/10/comments","events_url":"https://api.github.com/repos/flatpak/flatpak-builder/issues/10/events","html_url":"https://github.com/flatpak/flatpak-builder/issues/10","id":252852643,"number":10,"title":"flatpak-builder sometimes set up incorrectly submodules worktree","user":{"login":"alexlarsson","id":990736,"avatar_url":"https://avatars2.githubusercontent.com/u/990736?v=4","gravatar_id":"","url":"https://api.github.com/users/alexlarsson","html_url":"https://github.com/alexlarsson","followers_url":"https://api.github.com/users/alexlarsson/followers","following_url":"https://api.github.com/users/alexlarsson/following{/other_user}","gists_url":"https://api.github.com/users/alexlarsson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlarsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlarsson/subscriptions","organizations_url":"https://api.github.com/users/alexlarsson/orgs","repos_url":"https://api.github.com/users/alexlarsson/repos","events_url":"https://api.github.com/users/alexlarsson/events{/privacy}","received_events_url":"https://api.github.com/users/alexlarsson/received_events","type":"User","site_admin":false},"labels":[{"id":676336920,"url":"https://api.github.com/repos/flatpak/flatpak-builder/labels/flatpak-builder","name":"flatpak-builder","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-25T09:57:32Z","updated_at":"2017-08-25T09:57:33Z","closed_at":null,"body":"_From @mildred on October 18, 2016 8:9_\n\nI 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)\n\nThe build command I have is : `flatpak-builder --repo=repo --subject=\"Patchwork Electron\" --verbose app com.github.electron.json`\n\nAt 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:\n\n```\n+ cd /run/build/electron-gtk3/electron/vendor/brightray/vendor/libchromiumcontent\n+ python script/bootstrap -v\nfatal: /usr/lib/git/git-core/git-submodule cannot be used without a working tree.\n```\n\nI debugged this, and could find that in that directory, `git rev-parse --is-inside-work-tree` results in `false` instead of `true`.\n\nI could trace it back to the fact that in this directory, the `.git` says the repository is outside /run:\n\n```\n$ cat /run/build/electron-gtk3/electron/vendor/brightray/vendor/libchromiumcontent/.git\ngitdir: /home/mildred/Projects/patchwork-electron/.flatpak-builder/build/electron-gtk3-2/.git/modules/electron/modules/vendor/brightray/modules/vendor/libchromiumcontent\n```\n\nAnd 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:\n\n```\n$ cd /run/build/electron-gtk3/electron/vendor/brightray/vendor/libchromiumcontent\n$ git config core.worktree\n../../../../../../../../../electron/vendor/brightray/vendor/libchromiumcontent\n$ git rev-parse --git-path $(git config core.worktree)\n/home/mildred/Projects/patchwork-electron/.flatpak-builder/build/electron-gtk3-2/.git/modules/electron/modules/vendor/brightray/modules/vendor/libchromiumcontent/../../../../../../../../../electron/vendor/brightray/vendor/libchromiumcontent\n```\n\nI 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.\n\nI have flatpak version 0.6.11 on both on Arch and Fedora\n\nedit : Removing the submodule working directories and running `git submodule update` in the `Makefile` 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.\n\n\n_Copied from original issue: flatpak/flatpak#353_"},"comment":{"url":"https://api.github.com/repos/flatpak/flatpak-builder/issues/comments/324874957","html_url":"https://github.com/flatpak/flatpak-builder/issues/10#issuecomment-324874957","issue_url":"https://api.github.com/repos/flatpak/flatpak-builder/issues/10","id":324874957,"user":{"login":"alexlarsson","id":990736,"avatar_url":"https://avatars2.githubusercontent.com/u/990736?v=4","gravatar_id":"","url":"https://api.github.com/users/alexlarsson","html_url":"https://github.com/alexlarsson","followers_url":"https://api.github.com/users/alexlarsson/followers","following_url":"https://api.github.com/users/alexlarsson/following{/other_user}","gists_url":"https://api.github.com/users/alexlarsson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlarsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlarsson/subscriptions","organizations_url":"https://api.github.com/users/alexlarsson/orgs","repos_url":"https://api.github.com/users/alexlarsson/repos","events_url":"https://api.github.com/users/alexlarsson/events{/privacy}","received_events_url":"https://api.github.com/users/alexlarsson/received_events","type":"User","site_admin":false},"created_at":"2017-08-25T09:57:33Z","updated_at":"2017-08-25T09:57:33Z","body":"I believe that should fix it.\n"}}
{"actor":{"display_login":"alexlarsson"}}