Skip to content
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

Handle existing installed flatpaks #20

Open
philclifford opened this issue Apr 7, 2022 · 1 comment
Open

Handle existing installed flatpaks #20

philclifford opened this issue Apr 7, 2022 · 1 comment

Comments

@philclifford
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Unsnap does not consider installed flatpaks. It would be nice if it would detect (or provide candidate matches) where the system already has both the snap and the flatpak installed. (I have a couple, but this also might arise for a sane user from attempts to migrate with or without using this utility)

Describe the solution you'd like

I would like the script to match installed flatpaks (and/or make them candidate suggestions) rather than report them as missing, and maybe to comment out their entry in the generated installation script, and if they do not exist in the mapping also provide a possible mapping and a note to maybe submit an issue ...

For example:

$snap list obsidian fractal
Name      Version                Rev  Tracking       Publisher    Notes
fractal   4.4.0-244-g8781378a79  106  latest/stable  ken-vandine  -
obsidian  0.14.2                 x2   -              -            -
$sort missingflatpak.txt|grep -v snap-store >missing
$flatpak list|sort -u |join -i - missing
Fractal org.gnome.Fractal 4.4 stable system
Obsidian md.obsidian.Obsidian 0.14.2 stable system

Note the case of the flatpaks. joining the other way round can generate some suggested matches.

flatpak list|sort -u |join -i  missing - |awk '{print $1 "," $2}' |tee -a extra-applist.csv
fractal,org.gnome.Fractal
obsidian,md.obsidian.Obsidian

I don't have any flatpaks and snaps installed that are already in the applist.csv but I guess handling that then handling the "unknown"/"candidate" scenario would be OK - for such an edge-case I'd expect to end up with a candidate match list to submit as well as a a missing list, and to be able to chose to merge the "candidates" and re-generate new scripts to review/use.

Desktop (please complete the following information):

OS: Ubuntu MATE 21.10 x86_64
Kernel: 5.13.0-39-lowlatency
Shell: bash 5.1.8

Describe alternatives you've considered
Just ignoring the daft edge-case users who might be in this situation would be fine too .

@popey
Copy link
Owner

popey commented Apr 7, 2022

Thanks for the issue @philclifford .
Yes, I agree, there's no point running flatpak install foo if foo is already installed. So we should at least omit those from the install script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants