Skip to content
Snippets Groups Projects

systemd/systemd: rework trigger script

Merged Oliver Smith requested to merge ollieparanoid/pmaports:rework-systemd-trigger into master
  • apk-tools passes the directories it triggers on as arguments to the trigger script. Use them to only run the relevant parts of the triggers.
  • Remove "|| :" from commands, as we run the script without "set -e", it won't fail if a single command fails. Put explicit "exit 0" at the end to ensure this even if the last command beforehand failed.
  • Print messages for each action so we know what is happening.

Example output:

qemu-amd64:~$ sudo apk add at-spi2-core-systemd
The following NEW packages will be installed:
  at-spi2-core-systemd
Need to download 1689 B of packages.
After this operation, 200 B of additional disk space will be used.
Do you want to continue [Y/n]? 
(1/1) Installing at-spi2-core-systemd (63-r0)
Executing systemd-256.11-r4.trigger
Running systemd daemon-reload...
Running systemd reload user@*.service...
Reloading/restarting marked user services for uid=10000...

As we can see it only runs some of the parts of the trigger script, depending on the dirs that were changed.

Follow-up to !6334 (merged).

Edited by Oliver Smith

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Caleb Connolly
  • Caleb Connolly
  • this is awesome! Thanks for cleaning this all up, and adding the prints.

    mostly just nit-pick suggestions, and a small logic fix

  • Caleb Connolly left review comments

    left review comments

  • Oliver Smith added 7 commits

    added 7 commits

    Compare with previous version

  • Oliver Smith resolved all threads

    resolved all threads

  • Author Maintainer

    all done, thanks for the review :)

  • Oliver Smith added 1 commit

    added 1 commit

    • f5de656a - systemd: rework trigger script

    Compare with previous version

  • Oliver Smith added 1 commit

    added 1 commit

    • f05eb41b - systemd: rework trigger script

    Compare with previous version

  • Oliver Smith added 10 commits

    added 10 commits

    Compare with previous version

  • Caleb Connolly approved this merge request

    approved this merge request

  • Robert Eckelmann approved this merge request

    approved this merge request

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading