[Reproducible-commits] [debbindiff] 01/01: Add support for ipk packages

Reiner Herrmann reiner at reiner-h.de
Sat Jun 13 16:33:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

deki-guest pushed a commit to branch master
in repository debbindiff.

commit 63362115fbb34f4b024b6ae1804477cffd0da8cd
Author: Reiner Herrmann <reiner at reiner-h.de>
Date:   Sat Jun 13 18:33:16 2015 +0200

    Add support for ipk packages
---
 debbindiff/comparators/__init__.py |  2 ++
 debbindiff/comparators/ipk.py      | 31 +++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/debbindiff/comparators/__init__.py b/debbindiff/comparators/__init__.py
index c70afa4..0246afc 100644
--- a/debbindiff/comparators/__init__.py
+++ b/debbindiff/comparators/__init__.py
@@ -37,6 +37,7 @@ from debbindiff.comparators.fonts import compare_ttf_files
 from debbindiff.comparators.gettext import compare_mo_files
 from debbindiff.comparators.gzip import compare_gzip_files
 from debbindiff.comparators.haskell import compare_hi_files
+from debbindiff.comparators.ipk import compare_ipk_files
 from debbindiff.comparators.iso9660 import compare_iso9660_files
 from debbindiff.comparators.pdf import compare_pdf_files
 from debbindiff.comparators.png import compare_png_files
@@ -87,6 +88,7 @@ COMPARATORS = [
     (r'^application/(x-debian-package|vnd.debian.binary-package)(;|$)', r'\.u?deb$', compare_deb_files),
     (r'^application/x-rpm(;|$)', r'\.rpm$', compare_rpm_files),
     (r'^application/x-gzip(;|$)', r'\.(dz|t?gz|svgz)$', compare_gzip_files),
+    (r'^application/x-gzip(;|$)', r'\.ipk$', compare_ipk_files),
     (r'^application/x-bzip2(;|$)', r'\.bzip2$', compare_bzip2_files),
     (r'^application/x-executable(;|$)', None, compare_elf_files),
     (r'^application/x-sharedlib(;|$)', r'\.so($|\.[0-9.]+$)',
diff --git a/debbindiff/comparators/ipk.py b/debbindiff/comparators/ipk.py
new file mode 100644
index 0000000..adc2e10
--- /dev/null
+++ b/debbindiff/comparators/ipk.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+#
+# debbindiff: highlight differences between two builds of Debian packages
+#
+# Copyright © 2015 Reiner Herrmann <reiner at reiner-h.de>
+#
+# debbindiff is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# debbindiff is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with debbindiff.  If not, see <http://www.gnu.org/licenses/>.
+
+from debbindiff.comparators.utils import binary_fallback
+from debbindiff.comparators.tar import compare_tar_files
+from debbindiff.comparators.gzip import decompress_gzip
+
+ at binary_fallback
+# ipk packages are just .tar.gz archives
+def compare_ipk_files(path1, path2, source=None):
+    differences = []
+    with decompress_gzip(path1) as tar1:
+        with decompress_gzip(path2) as tar2:
+            differences = compare_tar_files(tar1, tar2, source=source)
+    return differences

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debbindiff.git



More information about the Reproducible-commits mailing list