gmodena / nix-flatpak

Install flatpaks declaratively
Apache License 2.0
302 stars 10 forks source link

Similar refs failed build #34

Open bobberb opened 8 months ago

bobberb commented 8 months ago

Added org.wesnoth.Wesnoth to list.

Error:

user@d8n ~/d8n-config (master)> sudo nixos-rebuild switch --flake .
warning: Git tree '/home/user/d8n-config' is dirty
building the system configuration...
warning: Git tree '/home/user/d8n-config' is dirty
updating GRUB 2 menu...
activating the configuration...
setting up /etc...
reloading user units for user...
setting up tmpfiles
the following new units were started: systemd-localed.service
warning: the following units failed: flatpak-managed-install.service

× flatpak-managed-install.service
     Loaded: loaded (/etc/systemd/system/flatpak-managed-install.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2024-02-02 14:32:47 EST; 97ms ago
TriggeredBy: ● flatpak-managed-install.timer
    Process: 39689 ExecStart=/nix/store/rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install (code=exited, status=1/FAILURE)
   Main PID: 39689 (code=exited, status=1/FAILURE)
         IP: 202.7K in, 21.2K out
        CPU: 2.728s

Feb 02 14:32:44 d8n systemd[1]: Starting flatpak-managed-install.service...
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]: Similar refs found for ‘org.wesnoth.Wesnoth’ in remote ‘flathub’ (system):
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]:    1) app/org.wesnoth.Wesnoth/x86_64/stable
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]:    2) app/org.wesnoth.Wesnoth/x86_64/1.14
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]: Which do you want to use (0 to abort)? [0-2]: 0
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]: error: No ref chosen to resolve matches for ‘org.wesnoth.Wesnoth’
Feb 02 14:32:47 d8n systemd[1]: flatpak-managed-install.service: Main process exited, code=exited, status=1/FAILURE

``

ReedClanton commented 8 months ago

Change org.wesnoth.Wesnoth to org.wesnoth.Wesnoth//<theVersionYouWant> where <theVersionYouWant> is either stable or 1.14.

@gmodena This issue should probably be converted to one that covers updating docs to either explain this, or link to a resource that does.

ReedClanton commented 8 months ago

Maybe a link to this page that explains how flatpak identifiers are formatted to the docs. Also an example somewhere that uses it.

gmodena commented 8 months ago

I'll leave this issue open for future reference and add some pointers to doc; but I think the error message (and @ReedClanton ) was pretty clear :

Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]: Similar refs found for ‘org.wesnoth.Wesnoth’ in remote ‘flathub’ (system):
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]:    1) app/org.wesnoth.Wesnoth/x86_64/stable
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]:    2) app/org.wesnoth.Wesnoth/x86_64/1.14
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]: Which do you want to use (0 to abort)? [0-2]: 0
Feb 02 14:32:47 d8n rv2gx05rij8gnr803iqinkg9s979946y-flatpak-managed-install[39862]: error: No ref chosen to resolve matches for ‘org.wesnoth.Wesnoth’
Liassica commented 7 months ago

One issue with this is that when you select a specific branch (e.g. org.wesnoth.Wesnoth//stable) and have uninstallUnmanagedPackages set to true it will uninstall and then reinstall the package on every system generation since it only checks against the base app ID (org.wesnoth.Wesnoth//stable != org.wesnoth.Wesnoth, uninstalled; org.wesnoth.Wesnoth//stable on the list, reinstalled).