diff options
| -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" | |||
| 5 | LICENSE = "GPLv2" | 5 | LICENSE = "GPLv2" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 7 | 7 | ||
| 8 | SRC_URI = "git://github.com/openSUSE/build-compare.git" | 8 | SRC_URI = "git://github.com/openSUSE/build-compare.git \ |
| 9 | SRC_URI += "file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1" | 9 | file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1 \ |
| 10 | SRC_URI += "file://Ignore-DWARF-sections.patch;striplevel=1" | 10 | file://Ignore-DWARF-sections.patch;striplevel=1 \ |
| 11 | file://0001-Add-support-for-deb-and-ipk-packaging.patch \ | ||
| 12 | " | ||
| 11 | PATCHTOOL = "git" | 13 | PATCHTOOL = "git" |
| 12 | 14 | ||
| 13 | SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a" | 15 | 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 @@ | |||
| 1 | From 02dbc7e3478e409d6f5e3e1c53daddf8838be999 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 3 | Date: Tue, 1 Sep 2015 12:04:33 +0100 | ||
| 4 | Subject: [PATCH] Add support for deb and ipk packaging | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 9 | --- | ||
| 10 | functions.sh | 15 +++++++++++++++ | ||
| 11 | pkg-diff.sh | 6 ++++++ | ||
| 12 | 2 files changed, 21 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/functions.sh b/functions.sh | ||
| 15 | index 06079df..85c9003 100644 | ||
| 16 | --- a/functions.sh | ||
| 17 | +++ b/functions.sh | ||
| 18 | @@ -85,6 +85,13 @@ function unpackage() | ||
| 19 | CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories --quiet" | ||
| 20 | rpm2cpio $file | cpio ${CPIO_OPTS} | ||
| 21 | ;; | ||
| 22 | + *.ipk|*.deb) | ||
| 23 | + ar x $file | ||
| 24 | + tar xf control.tar.gz | ||
| 25 | + rm control.tar.gz | ||
| 26 | + tar xf data.tar.gz | ||
| 27 | + rm data.tar.gz | ||
| 28 | + ;; | ||
| 29 | esac | ||
| 30 | popd 1>/dev/null | ||
| 31 | } | ||
| 32 | @@ -255,4 +262,12 @@ function cmp_spec () | ||
| 33 | rm $file1 $file2 | ||
| 34 | return $RES | ||
| 35 | } | ||
| 36 | + | ||
| 37 | +function adjust_controlfile () { | ||
| 38 | + cat $1/control | sed '/^Version: /d' > $1/control.fixed | ||
| 39 | + mv $1/control.fixed $1/control | ||
| 40 | + cat $2/control | sed '/^Version: /d' > $2/control.fixed | ||
| 41 | + mv $2/control.fixed $2/control | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | # vim: tw=666 ts=2 et | ||
| 45 | diff --git a/pkg-diff.sh b/pkg-diff.sh | ||
| 46 | index 0f1fa76..3cf10aa 100644 | ||
| 47 | --- a/pkg-diff.sh | ||
| 48 | +++ b/pkg-diff.sh | ||
| 49 | @@ -138,6 +138,12 @@ echo "Extracting packages" | ||
| 50 | unpackage $oldpkg $dir/old | ||
| 51 | unpackage $newpkg $dir/new | ||
| 52 | |||
| 53 | +case $oldpkg in | ||
| 54 | + *.deb|*.ipk) | ||
| 55 | + adjust_controlfile $dir/old $dir/new | ||
| 56 | + ;; | ||
| 57 | +esac | ||
| 58 | + | ||
| 59 | # files is set in cmp_spec for rpms, so if RES is empty we should assume | ||
| 60 | # it wasn't an rpm and pick all files for comparison. | ||
| 61 | if [ -z $RES ]; then | ||
| 62 | -- | ||
| 63 | 2.1.0 | ||
| 64 | |||
