B
BlueBuildโ€ข2mo ago
Sjoerd93

Default Flatpaks not installing?

Hey, I just tried out to run my own spin using BlueBuild. Everything works great, however it seems the default Flatpaks I specified are not installing. This is the case both for my regular system which was already set up, but also when I built an ISO and installed that in GNOME Boxes. Packages that I defined to be installed in rpm-ostree work fine. The interesting thing is that the GitHub Action does seem to handle the flatpaks, as I did get an error when I pointed to a flatpak from the fedora repository (it's not on Flathub with that name, so it couldn't find it). So it's not like the default flatpaks are ignored. Is there something I'm doing wrong, or is this a bug perhaps with the new default-flatpak module? For reference, I have my flatpaks defined in a seperate yaml file called default-flatpaks.yml. Then I just point to that in my regular recipe like - from-file: default-flatpaks.yml The yml file with my default flatpaks is identical to the one in the example, but with different flatpaks of course. Here's my regular recipe: https://github.com/sstendahl/SjoerdOS/blob/main/recipes/recipe.yml And here's my flatpak yml:https://github.com/sstendahl/SjoerdOS/blob/main/recipes/default-flatpaks.yml If this indeed is a bug, I can file an issue if you want to.
GitHub
SjoerdOS/recipes/recipe.yml at main ยท sstendahl/SjoerdOS
My Universal-Blue based spin. Contribute to sstendahl/SjoerdOS development by creating an account on GitHub.
GitHub
SjoerdOS/recipes/default-flatpaks.yml at main ยท sstendahl/SjoerdOS
My Universal-Blue based spin. Contribute to sstendahl/SjoerdOS development by creating an account on GitHub.
Solution:
GitHub
fix: Add check for empty flatpak list by sstendahl ยท Pull Request ...
Adds a check when flatpak list for the apps and runtimes is empty. Fixes an issue where the flatpaks wouldn't install when no runtimes or apps where installed in user-space, due to an empty...
Jump to solution
5 Replies
CarrotManMatt
CarrotManMattโ€ข2mo ago
Have you run the setup commands after boot? bluebuild-flatpak-manager I believe it's called
Sjoerd93
Sjoerd93OPโ€ข2mo ago
Ah, no I haven't. I set it to enable all now, so I'll just wait and see if the install gets triggered. It does show the correct list of flatpaks at least if I run bluebuild-flatpak-manager show, so that's good. Should it need to be enabled manually? It seems like enable all just runs the following command:
sstendahl@dellusion:~$ bluebuild-flatpak-manager enable all
Running: systemctl enable --now system-flatpak-setup.timer
Running: run0 systemctl enable --global user-flatpak-setup.timer
sstendahl@dellusion:~$ bluebuild-flatpak-manager enable all
Running: systemctl enable --now system-flatpak-setup.timer
Running: run0 systemctl enable --global user-flatpak-setup.timer
So in that case, I'll just try and see if I can configure that to run at first boot. It's kinda helpful that there's some projects out there on GitHub that have a few things configured, that helps ๐Ÿ˜› I'll let you know if the flatpaks start installing also, so then I can mark this as solved ๐Ÿ™‚ Nothing really seemed to be happening, but if I tried apply all manually, or apply user I got an error:
sstendahl@dellusion:~$ bluebuild-flatpak-manager apply user
Error: nu::shell::pipeline_mismatch

ร— Pipeline empty.
โ•ญโ”€[/usr/libexec/bluebuild/default-flatpaks/user-flatpak-setup:27:133]
26 โ”‚
27 โ”‚ let fedoraRuntimes = flatpak list --user --runtime --columns=origin,application,arch,branch | detect columns --no-headers | where column0 == fedora | each {|i| $"($i.column1)/($i.column2)/($i.column3)" }
ยท โ”€โ”€โ”ฌโ”€โ”€
ยท โ•ฐโ”€โ”€ no input value was piped in
28 โ”‚ if (($fedoraRuntimes | length) > 0) {
โ•ฐโ”€โ”€โ”€โ”€

sstendahl@dellusion:~$ bluebuild-flatpak-manager apply system
fedora-third-party must be run as root.
sstendahl@dellusion:~$ sudo bluebuild-flatpak-manager apply system
[sudo] password for sstendahl:
Use 'fedora-third-party disable' to change the existing status.
sstendahl@dellusion:~$
sstendahl@dellusion:~$ bluebuild-flatpak-manager apply user
Error: nu::shell::pipeline_mismatch

ร— Pipeline empty.
โ•ญโ”€[/usr/libexec/bluebuild/default-flatpaks/user-flatpak-setup:27:133]
26 โ”‚
27 โ”‚ let fedoraRuntimes = flatpak list --user --runtime --columns=origin,application,arch,branch | detect columns --no-headers | where column0 == fedora | each {|i| $"($i.column1)/($i.column2)/($i.column3)" }
ยท โ”€โ”€โ”ฌโ”€โ”€
ยท โ•ฐโ”€โ”€ no input value was piped in
28 โ”‚ if (($fedoraRuntimes | length) > 0) {
โ•ฐโ”€โ”€โ”€โ”€

sstendahl@dellusion:~$ bluebuild-flatpak-manager apply system
fedora-third-party must be run as root.
sstendahl@dellusion:~$ sudo bluebuild-flatpak-manager apply system
[sudo] password for sstendahl:
Use 'fedora-third-party disable' to change the existing status.
sstendahl@dellusion:~$
I had the scope set to system, had no list of flatpaks setup for user. Now I just removed the scope argument, and will try again after the image is built and everything. Maybe that makes a difference. Yeah I actually think it's a bug, and I'm also pretty sure it's indeed my issue. Here

let fedoraRuntimes = flatpak list --user --runtime --columns=origin,application,arch,branch | detect columns --no-headers | where column0 == fedora | each {|i| $"($i.column1)/($i.column2)/($i.column3)" }

let fedoraRuntimes = flatpak list --user --runtime --columns=origin,application,arch,branch | detect columns --no-headers | where column0 == fedora | each {|i| $"($i.column1)/($i.column2)/($i.column3)" }
fedoraRuntimes will be completely empty if you don't have any runtimes installed in user-space. Typically runtime are installed at system-level, so this is even expected to be empty. Leaving to an empty argument (not that familiar with Nushell, but basically Null instead of ""). On the next line, you're piping this into length, but length doesn't seem to accept an empty input for an argument. Hence the error. Now to test, I installed the GNOME 48 runtime into user, and indeed this solved the issue. It's installing the flatpaks I specified as we speak. I guess a fix would be to set a default value or something. Again not that familiar with nu-shell but fedoraRuntimes? | default [] | length could maybe work? Either way, will file an issue on the GitHub page.
Sjoerd93
Sjoerd93OPโ€ข2mo ago
The problem is actually in the let fedoraRuntimes line, detect columns has no input piped into it. Filed an issue; https://github.com/blue-build/modules/issues/437
GitHub
New default-flatpaks not working when nu runtimes are installed ...
See title, I just started rolling my own image, and noticed the flatpaks I specified in my recipe are not installing. After a pointer on the Discord I found that I get the following error when tryi...
fiftydinar
fiftydinarโ€ข2mo ago
I maintain v1 version of the default-flatpaks module, so I'll let @xyny handle that once she's available
Solution
Sjoerd93
Sjoerd93โ€ข5w ago
GitHub
fix: Add check for empty flatpak list by sstendahl ยท Pull Request ...
Adds a check when flatpak list for the apps and runtimes is empty. Fixes an issue where the flatpaks wouldn't install when no runtimes or apps where installed in user-space, due to an empty...

Did you find this page helpful?