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

Handling DistributionNotFound exceptions #60

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sezanzeb
Copy link
Contributor

@sezanzeb sezanzeb commented Jan 6, 2022

@jmaibaum does this work for you? Is the os.environ.get('container') == 'flatpak' test reliable?

@sezanzeb sezanzeb changed the title Can handle DistributionNotFound exceptions Handling DistributionNotFound exceptions Jan 6, 2022
@jmaibaum
Copy link
Contributor

jmaibaum commented Jan 7, 2022

@sezanzeb Thanks for looking into this! A flatpak built from this PR's ref launches normally again, but it shows unknown-version instead of a proper version number. Both on the command line:

$ flatpak run --user org.soundconverter.SoundConverter//master
ERROR: Disabling mp3-id-tags output. Do you have "gst-plugins-good" installed?
ERROR: Disabling mp3-vbr-tags output. Do you have "gst-plugins-ugly" installed?
soundconverter unknown-version

and in the GUI:

Bildschirmfoto von 2022-01-07 21-37-57

Is it possible to specify the version at build time?

@sezanzeb
Copy link
Contributor Author

sezanzeb commented Jan 7, 2022

"unknown-version" is the fallback for this case

Is it possible to specify the version at build time?

Yes, input-remapper does something similar with the commit hash: https://github.com/sezanzeb/input-remapper/blob/main/setup.py#L34, it writes it into a python file which is then imported during runtime. Instead of asking git tag or something we could also use a constant in setup.py with the version, use it in the DistUtilsExtra.auto.setup configuration and use it to generate a file that can be imported during runtime.

Or we hardcode the version number. It is hardcoded in setup.py already anyway. We just shouldn't forget to change it everywhere.

@jmaibaum
Copy link
Contributor

jmaibaum commented Jan 9, 2022

I have no preference if you hardcode the version number or if I have to set it during packaging, but I'd prefer to have something else than "unknown version" showing up.

jmaibaum added a commit to jmaibaum/org.soundconverter.SoundConverter that referenced this pull request Jan 9, 2022
This should not be necessary, but until someone can tell me what is
going on here, at least this starts soundconverter again.

Revisit after kassoulet/soundconverter#60 has
been merged with a way to set a proper version number.

Fixes flathub#6
@sezanzeb sezanzeb marked this pull request as draft January 17, 2022 11:39
@sezanzeb
Copy link
Contributor Author

sezanzeb commented Jan 17, 2022

I hope I'll find time to do this at some point, there are a lot of other things open in other projects right now

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

Successfully merging this pull request may close these issues.

2 participants