Risk 0/5 · Safe
wlroots-git.install
Result #5111
Comment
This .install change only adds a post-upgrade notice that compares old/new package versions and prints a rebuild warning when the wlroots SONAME major.minor changes. It does not execute external commands, modify system state, access the network, or alter package contents. The logic is straightforward and limited to user-facing messaging, so I see no security concern in this diff.
@@ -0,0 +1,14 @@
+post_upgrade() {
+ # pkgver is MAJOR.MINOR.PATCH.rCOUNT.HASH and the library is named
+ # libwlroots-MAJOR.MINOR.so, so a MAJOR.MINOR change replaces the library.
+ local new=${1%-*} old=${2%-*}
+ new=${new%.*.*.*}
+ old=${old%.*.*.*}
+ if [ "${new}" != "${old}" ]; then
+ cat <<EOF
+==> libwlroots-${old}.so has been replaced by libwlroots-${new}.so.
+ Rebuild sway-git and any other package built against wlroots-git,
+ otherwise they will fail to start.
+EOF
+ fi
+}