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

Why does location.provider exist? #84013

Closed
worldofpeace opened this issue Apr 1, 2020 · 6 comments
Closed

Why does location.provider exist? #84013

worldofpeace opened this issue Apr 1, 2020 · 6 comments
Labels
0.kind: question Requests for a specific question to be answered

Comments

@worldofpeace
Copy link
Contributor

Describe the bug
If you set location.provider to geoclue2 it enables geoclue2.
It seems to exist only for clight.

cc @eadwu and @infinisil maybe?

@worldofpeace worldofpeace added the 0.kind: question Requests for a specific question to be answered label Apr 1, 2020
@matthewbauer
Copy link
Member

It can probably be removed if this is the only place it's used. It looks like it means "is location.latitude and location.longitude set and should it be used to determine location".

I think location.latitude and location.longitude should probably just default to null and we only set those values when it's not null.

@infinisil
Copy link
Member

It also exists for the redshift module. This was done on my request in #64309, since both redshift and clight would have exactly the same options for location.

@jonringer
Copy link
Contributor

the redshift module doesn't consume provider though, only lat/long. from what I saw, it was only there to do services.geoclue2.enable = true; see #84019

@infinisil
Copy link
Member

@jonringer It very much does:

providerString = if lcfg.provider == "manual"
then "${toString lcfg.latitude}:${toString lcfg.longitude}"
else lcfg.provider;

@jonringer
Copy link
Contributor

jonringer commented Apr 2, 2020

could be re-written as:

 providerString = if !services.geoclue2.enable
   then "${toString lcfg.latitude}:${toString lcfg.longitude}" 
   else "geoclue2";

@worldofpeace
Copy link
Contributor Author

It's certainly an interesting thing, but I'm not sure any action is needed on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: question Requests for a specific question to be answered
Projects
None yet
Development

No branches or pull requests

4 participants