When we run `portablectl detach --enable --runtime`, then it triggers `DisableUnitFilesWithFlags` DBus method and the main unit file is removed, but its drop-ins are not. Hence, portable_detach() failed to list existing portable units. This makes the loop for listing portable units also accept drop-in directories. So, all remaining drop-in directories are correctly removed. Before: ``` testsuite-29.sh[600]: + portablectl detach --now --runtime --enable /tmp/rootdir minimal-app0 portablectl[1391]: (Matching unit files with prefixes 'minimal-app0'.) portablectl[1391]: Queued /org/freedesktop/systemd1/job/1812 to call StopUnit on portable service minimal-app0-foo.service. portablectl[1391]: Removed "/run/systemd/system.attached/minimal-app0-foo.service". portablectl[1391]: Queued /org/freedesktop/systemd1/job/1813 to call StopUnit on portable service minimal-app0.service. portablectl[1391]: Removed "/run/systemd/system.attached/minimal-app0.service". portablectl[1391]: Got result done/Success for job minimal-app0-foo.service portablectl[1391]: Got result done/Success for job minimal-app0.service portablectl[1391]: DetachImage failed: No unit files associated with '/tmp/rootdir' found attached to the system. Image not attached? ``` After: ``` testsuite-29.sh[508]: + portablectl detach --now --runtime --enable /tmp/rootdir minimal-app0 portablectl[1076]: (Matching unit files with prefixes 'minimal-app0'.) portablectl[1076]: Queued /org/freedesktop/systemd1/job/1946 to call StopUnit on portable service minimal-app0-foo.service. portablectl[1076]: Removed "/run/systemd/system.attached/minimal-app0-foo.service". portablectl[1076]: Queued /org/freedesktop/systemd1/job/1947 to call StopUnit on portable service minimal-app0.service. portablectl[1076]: Removed "/run/systemd/system.attached/minimal-app0.service". portablectl[1076]: Removed /run/systemd/system.attached/minimal-app0.service.d/10-profile.conf. portablectl[1076]: Removed /run/systemd/system.attached/minimal-app0.service.d/20-portable.conf. portablectl[1076]: Removed /run/systemd/system.attached/minimal-app0.service.d. portablectl[1076]: Removed /run/systemd/system.attached/minimal-app0-foo.service.d/10-profile.conf. portablectl[1076]: Removed /run/systemd/system.attached/minimal-app0-foo.service.d/20-portable.conf. portablectl[1076]: Removed /run/systemd/system.attached/minimal-app0-foo.service.d. portablectl[1076]: Removed /run/portables/rootdir. portablectl[1076]: Removed /run/systemd/system.attached. ```
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.
