-
Notifications
You must be signed in to change notification settings - Fork 37
Introduce 'localbase' Meson option. #132
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
Conversation
|
Can I get a review on this? |
|
Monthly bump. |
|
It's been a year in total while I'm waiting for this PR. |
meson_options.txt
Outdated
| value: '', | ||
| description: 'Override the directory where gir-to-d searches for GIR files.' | ||
| ) | ||
| option('localbase', type : 'string', value : '/usr', description : 'Prefix under which all 3rd party software is installed') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the name localbase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I borrowed the terminology from FreeBSD where localbase is a variable (and a sysctl) that contains "path to the local software directory". I'm not really sure what "local" means in this context.
Some Linux distributions as well as FreeBSD OS install 3rd party software into a prefix that differs from "/usr". This change makes asgen work in such cases.
|
Rebased onto C++ version. Didn't run-test it yet, but I basically translated the changes from the D version of this PR. |
|
@ximion We at FreeBSD need this PR to have AppStream working. Please, can we work through it to get it merged? I will be happy to address any raised comments. |
|
Weird, I could have sworn I commented on this ages ago - maybe on the bug report? Making it a runtime option though is far more likely to work, ideally as part of the backend itself (so, the backend decides which path is valid). Doing this in a way that is still performant is a bit harder though (lots of stupid string concatenations in very hot codepaths, so e.g. for the I was going to have a look at it (and during the C++ translation I thought I could just unconditionally scan |
7d7c6cd to
30d86a8
Compare
That would be great. Any progress on this front? |
|
Please test if this change works for you! Your backend will have to override the Since this is a runtime option, data will be processed the same way on all platforms with the same backend (and how asgen is compiled won't impact this). |
|
Great, thank you! Are changes to datainjectpkg.cpp not needed, though? This code also uses hardcoded "/usr" prefix. |
|
Yes, but that's for injected data and we can expect users to use the normal prefix here (it's also much easier to document the feature that way). |
This is required because we change AscCompose to *only* look at backend-prefixed paths, so we need to make sure that the fake package adheres to whatever it was that the backend has set. This is not required for icon paths, as we look at those in /usr unconditionally. CC: #132
Some Linux distributions as well as FreeBSD OS install 3rd party software into a prefix that differs from "/usr". This change makes asgen work in such cases.