[debian-edu-commits] r88296 - trunk/src/build/CD-administrator

pere at alioth.debian.org pere at alioth.debian.org
Sat Jan 28 08:02:35 UTC 2017


Author: pere
Date: 2017-01-28 08:02:35 +0000 (Sat, 28 Jan 2017)
New Revision: 88296

Added:
   trunk/src/build/CD-administrator/find-dup-libs
Log:
Add tool to find duplicate (multiversion) libraries.

Added: trunk/src/build/CD-administrator/find-dup-libs
===================================================================
--- trunk/src/build/CD-administrator/find-dup-libs	                        (rev 0)
+++ trunk/src/build/CD-administrator/find-dup-libs	2017-01-28 08:02:35 UTC (rev 88296)
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Find packages with many versions included in Debian, using a list of
+# packages on a ISO created by debian-cd.  The list of packages look
+# like this:
+#
+# acpi-support-base_0.142-8_all.deb
+# acpi_1.7-1_amd64.deb
+# acpi_1.7-1_i386.deb
+# acpid_2.0.28-1_amd64.deb
+# acpid_2.0.28-1_i386.deb
+# adduser_3.115_all.deb
+# alsa-utils-udeb_1.1.2-1_amd64.udeb
+#
+# The list is created by running this command with a generated ISO:
+#   (for f in `find /path/to/mounted/iso -name *.deb -o -name *.udeb`; do \
+#      basename $f; done ) | sort -u
+
+pkglist=pkgdeblist-stretch-usbstick.txt
+
+if [ "$1" ] ; then
+    pkglist="$1"
+fi
+
+getpkglist_old() {
+    # Pick the first no-'all' architecture in the list.
+    arch=$(rev "$pkglist" | cut -d_ -f1 | rev | cut -d. -f1 |
+	sort -u | grep -v all | head -1)
+    grep "_$arch.deb" $pkglist  
+}
+getpkglist() {
+    arch="$(dpkg --print-architecture)"
+    dpkg -l | awk "/$arch/ {print \$2}"|cut -d: -f1
+}
+
+for pkg in $(getpkglist | cut -d_ -f1 | grep '[0-9.]$' | sed 's/[0-9.]*$//' |
+    sort | uniq -c | sort -n | awk '{ if ($1 > 1) {print $2} }'); do
+    echo $pkg
+    getpkglist | egrep "^$pkg[0-9.]+(_|$)" | sed 's/^/  /'
+done


Property changes on: trunk/src/build/CD-administrator/find-dup-libs
___________________________________________________________________
Added: svn:executable
   + *




More information about the debian-edu-commits mailing list