[Piuparts-devel] [Git][debian/piuparts][develop] 2 commits: p.conf: fix arch substitution

Holger Levsen gitlab at salsa.debian.org
Thu Apr 11 10:57:26 BST 2019



Holger Levsen pushed to branch develop at Debian / piuparts


Commits:
353f92ce by Andreas Beckmann at 2019-04-11T09:56:41Z
p.conf: fix arch substitution

Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
eb4e8782 by Andreas Beckmann at 2019-04-11T09:56:47Z
find_unowned_lib_links: handle --merged-usr environments

Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


3 changed files:

- custom-scripts/scripts/pre_remove_40_find_unowned_lib_links
- debian/changelog
- instances/piuparts.conf-template.pejacevic


Changes:

=====================================
custom-scripts/scripts/pre_remove_40_find_unowned_lib_links
=====================================
@@ -1,16 +1,28 @@
 #!/bin/sh
 set -e
 
-for libdir in /lib /usr/lib /lib/*-gnu* /usr/lib/*-gnu*
+for prefix in / /usr/
 do
+  for lib in "${prefix}lib" "${prefix}lib32" "${prefix}lib64" "${prefix}libx32"
+  do
+    test -d "$lib" || continue
+    test -L "$lib" && continue
+    for libdir in "$lib" "$lib"/*-gnu*
+    do
 	test -d "$libdir" || continue
 	for f in "$libdir"/*
 	do
-		test ! -d "$f" || continue
+		test -d "$f" && continue
 		test -L "$f" || continue
 		rl=$(readlink "$f")
 		test -n "${rl##/etc/alternatives/*}" || continue
-		if ! dpkg-query -S "$f" >/dev/null 2>&1
+		owned=0
+		dpkg-query -S "$f" >/dev/null 2>&1 && owned=1
+		if [ "$owned" = "0" ] && [ -L "/lib" ]
+		then
+			dpkg-query -S "${f#/usr}" >/dev/null 2>&1 && owned=1
+		fi
+		if [ "$owned" = "0" ]
 		then
 			case "$f" in
 				/lib/ld-lsb.so.?)
@@ -39,4 +51,6 @@ do
 			echo "UNOWNED SYMLINK $f -> $rl"
 		fi
 	done
+    done
+  done
 done


=====================================
debian/changelog
=====================================
@@ -30,6 +30,8 @@ piuparts (0.99) UNRELEASED; urgency=medium
   * scripts/post_distupgrade_exceptions:
     - Handle /var/lib/pam/seen stretch -> buster upgrade by running
       pam-auth-update if needed. Workaround for #920760.
+  * scripts/pre_remove_40_find_unowned_lib_links:
+    - Handle --merged-usr environments.
   * master-bin/reschedule_piuparts_tests: Do not act on 'bugged/*.log' and
     'affected/*.log' by default. Add --bugged, --affected flags.
 


=====================================
instances/piuparts.conf-template.pejacevic
=====================================
@@ -268,7 +268,7 @@ piuparts-flags =
 	%(flags-default)s
 distro = None
 upgrade-test-distros = sid
-chroot-tgz = %(upgrade-test-distros)s-merged-usr_%(arch)s.tgz
+chroot-tgz = %(upgrade-test-distros)s-merged-usr_ at ARCH@.tgz
 # 3 days (60*60*24*3)
 max-tgz-age = 259200
 
@@ -390,7 +390,7 @@ piuparts-flags =
 	--merged-usr
 	%(flags-default)s
 distro = sid
-chroot-tgz = %(distro)s-merged-usr_%(arch)s.tgz
+chroot-tgz = %(distro)s-merged-usr_ at ARCH@.tgz
 
 
 [sid-broken-symlinks]



View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/f5ca92e07ad196eae51254b222471704033f12ae...eb4e8782b118c1e167f79e0ea96c4b831da5f610

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/f5ca92e07ad196eae51254b222471704033f12ae...eb4e8782b118c1e167f79e0ea96c4b831da5f610
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/20190411/a8a92d48/attachment-0001.html>


More information about the Piuparts-devel mailing list