diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-09-08 14:41:51 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-12 22:47:23 +0100 |
commit | 60564c6d6b8c1a3813baa04fb0d5597cf63f2a9f (patch) | |
tree | d8aa7d79fb4a0bc8f1cdee60bc37c944c8b67eff /meta | |
parent | 090196dd2d8f4306b34b239e78c39d37cc86034c (diff) | |
download | openembedded-core-60564c6d6b8c1a3813baa04fb0d5597cf63f2a9f.tar.gz openembedded-core-60564c6d6b8c1a3813baa04fb0d5597cf63f2a9f.tar.bz2 openembedded-core-60564c6d6b8c1a3813baa04fb0d5597cf63f2a9f.zip |
build-compare: add support for examining deb and ipk packages
This is just rudimentary support at the moment as we'd potentially want
to compare the control files a bit more specifically than this does, but
it's a start.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/build-compare/build-compare_git.bb | 8 | ||||
-rw-r--r-- | meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch | 64 |
2 files changed, 69 insertions, 3 deletions
diff --git a/meta/recipes-devtools/build-compare/build-compare_git.bb b/meta/recipes-devtools/build-compare/build-compare_git.bb index 418aee0d5e..7ac37846b6 100644 --- a/meta/recipes-devtools/build-compare/build-compare_git.bb +++ b/meta/recipes-devtools/build-compare/build-compare_git.bb @@ -5,9 +5,11 @@ HOMEPAGE = "https://github.com/openSUSE/build-compare" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -SRC_URI = "git://github.com/openSUSE/build-compare.git" -SRC_URI += "file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1" -SRC_URI += "file://Ignore-DWARF-sections.patch;striplevel=1" +SRC_URI = "git://github.com/openSUSE/build-compare.git \ + file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1 \ + file://Ignore-DWARF-sections.patch;striplevel=1 \ + file://0001-Add-support-for-deb-and-ipk-packaging.patch \ + " PATCHTOOL = "git" SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a" diff --git a/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch b/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch new file mode 100644 index 0000000000..5c15218c8a --- /dev/null +++ b/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch @@ -0,0 +1,64 @@ +From 02dbc7e3478e409d6f5e3e1c53daddf8838be999 Mon Sep 17 00:00:00 2001 +From: Paul Eggleton <paul.eggleton@linux.intel.com> +Date: Tue, 1 Sep 2015 12:04:33 +0100 +Subject: [PATCH] Add support for deb and ipk packaging + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> +--- + functions.sh | 15 +++++++++++++++ + pkg-diff.sh | 6 ++++++ + 2 files changed, 21 insertions(+) + +diff --git a/functions.sh b/functions.sh +index 06079df..85c9003 100644 +--- a/functions.sh ++++ b/functions.sh +@@ -85,6 +85,13 @@ function unpackage() + CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories --quiet" + rpm2cpio $file | cpio ${CPIO_OPTS} + ;; ++ *.ipk|*.deb) ++ ar x $file ++ tar xf control.tar.gz ++ rm control.tar.gz ++ tar xf data.tar.gz ++ rm data.tar.gz ++ ;; + esac + popd 1>/dev/null + } +@@ -255,4 +262,12 @@ function cmp_spec () + rm $file1 $file2 + return $RES + } ++ ++function adjust_controlfile () { ++ cat $1/control | sed '/^Version: /d' > $1/control.fixed ++ mv $1/control.fixed $1/control ++ cat $2/control | sed '/^Version: /d' > $2/control.fixed ++ mv $2/control.fixed $2/control ++} ++ + # vim: tw=666 ts=2 et +diff --git a/pkg-diff.sh b/pkg-diff.sh +index 0f1fa76..3cf10aa 100644 +--- a/pkg-diff.sh ++++ b/pkg-diff.sh +@@ -138,6 +138,12 @@ echo "Extracting packages" + unpackage $oldpkg $dir/old + unpackage $newpkg $dir/new + ++case $oldpkg in ++ *.deb|*.ipk) ++ adjust_controlfile $dir/old $dir/new ++ ;; ++esac ++ + # files is set in cmp_spec for rpms, so if RES is empty we should assume + # it wasn't an rpm and pick all files for comparison. + if [ -z $RES ]; then +-- +2.1.0 + |