summaryrefslogtreecommitdiff
path: root/libre/dpkg
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-02-18 01:56:34 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-02-18 01:56:34 +0000
commit8185891e28635bdb83fdf4ba4391030912dae596 (patch)
tree66a946535bdd228514750233b2cc99dd1866ff64 /libre/dpkg
parent60a11f87366fdfbd114cdc91ff813518858e5f8d (diff)
Tue Feb 18 01:56:27 UTC 2014
Diffstat (limited to 'libre/dpkg')
-rwxr-xr-xlibre/dpkg/compare26
-rw-r--r--libre/dpkg/compare.mk8
2 files changed, 34 insertions, 0 deletions
diff --git a/libre/dpkg/compare b/libre/dpkg/compare
new file mode 100755
index 000000000..4556440a5
--- /dev/null
+++ b/libre/dpkg/compare
@@ -0,0 +1,26 @@
+#!/bin/bash
+# compare the packages extracted in pkg/ to the packages from debian
+
+_check() {
+ local pacpkg=$1
+ local debpkg=$2
+
+ libremessages msg "dpkg:$debpkg -> pacman:$pacpkg"
+
+ make -f compare.mk tmp/$pacpkg.pacman.filelist tmp/$debpkg.debian.filelist &>/dev/null
+
+ echo -e 'pacman\tdpkg'
+ comm -3 \
+ <(sed -e 's|\.gz$||' tmp/$pacpkg.pacman.filelist|sort) \
+ <(sed -e 's|\.gz$||' -e '/^usr\/share\/man\/..\/man.\//d' -e 's|usr/share/perl5/|&vendor_perl/|' -e "s|$debpkg|$pacpkg|g" tmp/$debpkg.debian.filelist|sort)
+}
+
+mkdir -p tmp
+
+_check dpkg dpkg
+_check dpkg-devtools dpkg-dev
+_check dselect dselect
+_check libdpkg libdpkg-dev
+_check perl-dpkg libdpkg-perl
+
+rm -rf tmp
diff --git a/libre/dpkg/compare.mk b/libre/dpkg/compare.mk
new file mode 100644
index 000000000..88219f283
--- /dev/null
+++ b/libre/dpkg/compare.mk
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+# Assist file for ./compare
+
+tmp/%.debian.filelist:
+ curl http://packages.debian.org/sid/all/$*/filelist|sed -n "/<pre>/,/<\/pre>/{ s|.*<pre>||; s|</pre>.*||; /./p }"|sed 's|/||'|sort > $@
+
+tmp/%.pacman.filelist:
+ ( cd pkg/$* && find * -not -type d; ) | sort > $@