Skip to content

Conversation

vadorovsky
Copy link

@vadorovsky vadorovsky commented Jun 22, 2025

Before this change, import of systemd::is_systemd_used was hidden behind cfg(feature = "systemd") predicate. But that function is expected to be present in the autostart block even if systemd feature
is disabled.

Fix that by importing is_systemd_used unconditionally.

Provide an implementation of is_systemd_used for cfg(not(feature = "systemd")) which just returns false.

Fixes: #136

@vadorovsky vadorovsky changed the title ix: Call is_systemd_used only if the systemd feature is enabled fix: Call is_systemd_used only if the systemd feature is enabled Jun 22, 2025
@vadorovsky vadorovsky force-pushed the fix-autostart-no-systemd branch from 233dac3 to 4eb13ae Compare June 22, 2025 12:44
@vadorovsky
Copy link
Author

vadorovsky commented Jun 22, 2025

I proposed a GitHub workflow in a separate commit. It aims to run builds and tests with all feature combinations. Let me know if you agree with such approach.

Unfortunately, it looks like it's not actually running. Perhaps it needs some permissions enabled in the repository settings.

Before this change, import of `systemd::is_systemd_used` was hidden
behind `cfg(feature = "systemd")` predicate. But that function is
expected to be present in the autostart block even if `systemd` feature
is disabled.

Fix that by importing `is_systemd_used` unconditionally.

Provide an implementation of `is_systemd_used` for
`cfg(not(feature = "systemd"))` which just returns `false`.

Fixes: pop-os#136
@vadorovsky vadorovsky force-pushed the fix-autostart-no-systemd branch from 4eb13ae to 4d4ef0d Compare September 28, 2025 17:30
@vadorovsky vadorovsky changed the title fix: Call is_systemd_used only if the systemd feature is enabled fix: Allow to build with autostart and without systemd feature Sep 28, 2025
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.

Build failure when autostart feature is enabled, but systemd is disabled
1 participant