[Piuparts-devel] [Git][debian/piuparts][develop] 2 commits: also fix /bin/sync diversion for bookworm

Nicolas Dandrimont (@olasd) gitlab at salsa.debian.org
Tue Mar 19 08:40:30 GMT 2024



Nicolas Dandrimont pushed to branch develop at Debian / piuparts


Commits:
1b9a3843 by Helmut Grohne at 2024-03-18T14:42:10+01:00
also fix /bin/sync diversion for bookworm

dpkg-divert will rename a file regardless of whether it is installed by
a package. When coreutils ships /bin/sync in bookworm, the first of the
two diversions would still move it away. In bookworm we'd end up with
/bin/sync being diverted to /bin/sync.usr-is-merged but actually moved
to /usr/bin/sync.distrib. Hence debsums would fail later. Work around
this by manually implementing the rename part.

- - - - -
85045c69 by Nicolas Dandrimont at 2024-03-19T09:40:07+01:00
Merge branch 'helmutg/fix-sync-diversion-for-bookworm' into develop

- - - - -


1 changed file:

- custom-scripts/scripts/post_setup_force-unsafe-io


Changes:

=====================================
custom-scripts/scripts/post_setup_force-unsafe-io
=====================================
@@ -19,7 +19,16 @@ fi
 
 if [ ! -h /bin/sync ]
 then
-	dpkg-divert --rename /usr/bin/sync
-	dpkg-divert --rename --divert /bin/sync.usr-is-merged /bin/sync
+	if test -e /usr/bin/sync; then
+		if dpkg -S /usr/bin/sync >/dev/null 2>&1; then
+			mv /usr/bin/sync /usr/bin/sync.distrib
+		else
+			mv /bin/sync /bin/sync.distrib.usr-is-merged
+		fi
+		dpkg-divert --add --no-rename --divert /usr/bin/sync.distrib /usr/bin/sync
+	# else
+	# 	We're probably unmerged-/usr and a single diversion will do.
+	fi
+	dpkg-divert --add --no-rename --divert /bin/sync.distrib.usr-is-merged /bin/sync
 	ln -sv true /bin/sync
 fi



View it on GitLab: https://salsa.debian.org/debian/piuparts/-/compare/04e2c7d426b8c1680eaf37ed3af137023ad5e942...85045c69bd45d03df2edfa37bde8661b238ac3f8

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/-/compare/04e2c7d426b8c1680eaf37ed3af137023ad5e942...85045c69bd45d03df2edfa37bde8661b238ac3f8
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20240319/24f1ea62/attachment-0001.htm>


More information about the Piuparts-devel mailing list