-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Checklist
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug that matches the one I want to file, without success.
flatpak-builder version
1.4.4
Flatpak version
1.16.1
How to reproduce
- Make a new
testpackage.yml
:
id: test.pack.age
runtime: org.kde.Platform
runtime-version: '5.15-24.08'
sdk: org.kde.Sdk
command: hello
modules:
- name: hello
buildsystem: simple
build-commands:
- bash -c "ls"
- bash -c "pwd"
- install -Dm755 build.sh /app/bin/build.sh
sources:
- type: git
url: https://codeberg.org/lk108/Rounds
commit: 732438c71fc9421ab089fd6bb3f05c45cb958633
- type: git
url: https://codeberg.org/lk108/deltatouch
commit: fa92e5a46f09522dcaf4c71b57b6b39eaeaa0a88
- Run
flatpak-builder --user --install-deps-from=flathub --repo=repo --install builddir ./testpackage.yml
:
Updating org.kde.Sdk/aarch64/5.15-24.08
Nothing to do.
Dependency Runtime: org.kde.Platform 5.15-24.08
Updating org.kde.Platform/aarch64/5.15-24.08
Nothing to do.
Downloading sources
Initialized empty Git repository in /home/ellie/Develop/flatpak2/.flatpak-builder/git/https_codeberg.org_lk108_Rounds-AEFM82/
Fetching git repo https://codeberg.org/lk108/Rounds, ref refs/heads/main
remote: Enumerating objects: 48, done.
remote: Counting objects: 100% (48/48), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 48 (delta 7), reused 36 (delta 3), pack-reused 0 (from 0)
Receiving objects: 100% (48/48), 2.57 MiB | 363.00 KiB/s, done.
Resolving deltas: 100% (7/7), done.
From https://codeberg.org/lk108/Rounds
* [new branch] main -> main
Fetching git repo https://codeberg.org/lk108/deltatouch, ref refs/heads/lk108/no-dbus-check-on-startup
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Fetching git repo https://github.com/dlbeer/quirc, ref refs/tags/v1.2
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Fetching git repo https://github.com/chatmail/core.git, ref refs/tags/v1.159.5
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (1/1), 159 bytes | 159.00 KiB/s, done.
Starting build of test.pack.age
Cache miss, checking out last cache hit
========================================================================
Building module hello in /home/ellie/Develop/flatpak2/.flatpak-builder/build/hello-7
========================================================================
Note: switching to '732438c71fc9421ab089fd6bb3f05c45cb958633'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 732438c add info about target Ubuntu Touch version
fatal: unable to read tree (fa92e5a46f09522dcaf4c71b57b6b39eaeaa0a88)
This doesn't happen when the upper git repo entry is removed, or when cloning both repositories manually. It also doesn't happen when removing the build sources and adding --share=network
build options and git cloning as part of the build script rather than letting flatpak-builder do it.
Therefore, this seems to be a bug. My apologies if it isn't.
Expected Behavior
Git clone works and has no "fatal: unable to read tree" error at the end.
Actual Behavior
There is an error at the end of the git clone indicating something went wrong. Manual cloning works.
Additional Information
I'm not sure where these git clones go to when there are multiple, https://docs.flatpak.org/en/latest/module-sources.html has dest-filename
examples for files but no dest-subfolder
examples for git clones. When there's just a single git repo source, it doesn't seem to go into a subfolder named like the repo which I would think "Sources are copied or downloaded to the source directory before the build starts." in the docs suggest, so even for a single repo I find the text to be somewhat unclear. And there is no real info what happens with multiple or how to control into which subfolder name they go, from what I can tell.
I therefore suggest the documentation should be improved to explain how multiple git sources will be laid out, and how to control where they go for the build process. (Especially if that happens to be related to what I'm seeing here, I'm not sure that it is but I wouldn't know.)