elementary/settings-screentime-limits

PATH in error message different

Open

#154 opened on Oct 10, 2021

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Vala (13 forks)auto 404
Good First IssuePriority: Low

Repository metrics

Stars
 (14 stars)
PR merge metrics
 (PR metrics pending)

Description

What Happened?

I try to build the package so that the config. is saved to /var/lib, because on NixOS /etc is only writable by NixOS itself.

I set the meson flag -Dsysconfdir=var/lib.

I get the runtime issue:

Oct 10 12:50:26 gaming systemd[1]: Starting Pantheon Screen Time & Limits Daemon...
Oct 10 12:50:26 gaming pantheon-parent[95630]: UserConfig.vala:76: Could not find daemon config file: /var/lib/pantheon-parental-controls/daemon.conf does not exist
Oct 10 12:50:26 gaming pantheon-parent[95630]: UserConfig.vala:167: Failed to create file “var/lib/pantheon-parental-controls/daemon.conf.UY40A1”: No such file or directory
Oct 10 12:50:26 gaming systemd[1]: Started Pantheon Screen Time & Limits Daemon.

And here is the issue. From the code, both paths (Constants.DAEMON_CONF_FILE) should be the same, but they are printed differently.

I think it's because file.get_path is used here:

https://github.com/elementary/switchboard-plug-parental-controls/blob/49355a30710be1d84e9241fd7b59e1e2d17a38ba/src/daemon/UserConfig.vala#L76

but not here:

https://github.com/elementary/switchboard-plug-parental-controls/blob/49355a30710be1d84e9241fd7b59e1e2d17a38ba/src/daemon/UserConfig.vala#L167

Having the correct output would make debugging the build way more easy.

Steps to Reproduce

  1. Build with meson flag -Dsysconfdir=var/lib
  2. Run
  3. See error

Expected Behavior

Error messages should show the actual path.

OS Version

Other Linux

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

Contributor guide