Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit ba5aac6

Browse files
committed
scriptlet/01-alternatives.sh: add --quiet to --install operations
Whilst upgrading systemd, these warnings always gets printed: update-alternatives: warning: forcing reinstallation of alternative /usr/bin/systemctl because link group runlevel is broken update-alternatives: warning: forcing reinstallation of alternative /usr/bin/systemctl because link group reboot is broken update-alternatives: warning: forcing reinstallation of alternative /usr/bin/systemctl because link group shutdown is broken update-alternatives: warning: forcing reinstallation of alternative /usr/bin/systemctl because link group poweroff is broken update-alternatives: warning: forcing reinstallation of alternative /usr/bin/systemctl because link group halt is broken update-alternatives: warning: forcing reinstallation of alternative /usr/bin/systemctl because link group telinit is broken update-alternatives: warning: forcing reinstallation of alternative /usr/lib/systemd/systemd because link group init is broken However, the referenced files were always present, even after replacement. Adding the --quiet flag to suppress these seemingly nonsensical warnings and, since --quiet will still output errors when they occur (when the user should actually be alerted), this flag should be fine being added on as default. Ref: openSUSE does this repository-wide but for a different reason, but it should prove that this hack is safe enough. https://bugzilla.opensuse.org/show_bug.cgi?id=1172896#c3
1 parent 06e12d0 commit ba5aac6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scriptlet/01-alternatives.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# a more precise one
55
# addalt link name path prio
66
addalt(){
7-
echo "update-alternatives --install $(argprint "$@")" >> abscripts/postinst
7+
echo "update-alternatives --install $(argprint "$@") --quiet" >> abscripts/postinst
88
echo 'if [ "$1" != "upgrade" ]; then' >> abscripts/prerm
99
echo " update-alternatives --remove $(argprint "$2" "$3")" >> abscripts/prerm
1010
echo "fi" >> abscripts/prerm

0 commit comments

Comments
 (0)