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

Add option to ingore services #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calandracas606
Copy link

Pretty self explanatory. If I dont want to enable some services which would be enabled by default (elogind, polkit), I can disable them with -D "elogind polkit"

I'm not sure if I should be committing the generated content from make README.md

@paper42
Copy link
Member

paper42 commented Mar 1, 2024

as far as I remember, all services have to be explicitly enabled with an argument to mklive. Just don't list the services if you don't want them to be enabled.

@Calandracas606
Copy link
Author

when using build-x86-images.sh some services are passed implicitly

@paper42
Copy link
Member

paper42 commented Mar 2, 2024

then just edit build-x86-images.sh, I don't see a reason to have a mklive.sh argument that removes services that were added by another argument, just remove it from that argument

@Calandracas606
Copy link
Author

Calandracas606 commented Mar 3, 2024

For more context, I'm ignoring some packages when building by using the -g "eudev dbus elogind" which would otherwise be enabled by default

The image fails to build because mklive.sh tries to enable the services which are provided by packages which have been ignored.

This use case is very niche, and if this doesn't seem useful then go ahead and close the PR

@@ -153,10 +154,12 @@ ignore_packages() {
enable_services() {
SERVICE_LIST="$*"
for service in $SERVICE_LIST; do
if ! [ -e $ROOTFS/etc/sv/$service ]; then
die "service $service not in /etc/sv"
if ! [[ $IGNORE_SV =~ (^|[[:space:]])$service($|[[:space:]]) ]] ; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as of #384 i've started moving these stringy arrays to bash arrays, would be nice to do here too.

imo this is the most concise way of checking for array membership: https://github.com/void-linux/void-packages/pull/42656/files#diff-2aed335c529e5e6ba673dd15b329eba3605f22c2762850121093db28c4fa2f93R325-R328

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.

3 participants