diff options
| author | Kai Kang <kai.kang@windriver.com> | 2021-07-01 11:24:41 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-06-30 22:11:41 -0700 |
| commit | e2a4d4add495f29fe6c5629c34472e2d76497b5a (patch) | |
| tree | 0acdd7cbfe9e8ea936eedc5243450b506d9ceec5 | |
| parent | 40ed8d14ab56dff545b4bbc05663501457269395 (diff) | |
| download | meta-openembedded-e2a4d4add495f29fe6c5629c34472e2d76497b5a.tar.gz | |
bats: fix qa issue when multilib eanbled
Fix qa issue for bats when multilib is enabled:
| ERROR: bats-1.3.0-r0 do_package: QA Issue: bats: Files/directories
were installed but not shipped in any package:
| /usr/lib
| /usr/lib/bats-core
| /usr/lib/bats-core/formatter.bash
| /usr/lib/bats-core/test_functions.bash
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-test/bats/bats_1.3.0.bb | 3 | ||||
| -rw-r--r-- | meta-oe/recipes-test/bats/files/0001-install.sh-consider-multilib.patch | 43 |
2 files changed, 45 insertions, 1 deletions
diff --git a/meta-oe/recipes-test/bats/bats_1.3.0.bb b/meta-oe/recipes-test/bats/bats_1.3.0.bb index 8190a5e3a5..39a02733f1 100644 --- a/meta-oe/recipes-test/bats/bats_1.3.0.bb +++ b/meta-oe/recipes-test/bats/bats_1.3.0.bb | |||
| @@ -7,6 +7,7 @@ LICENSE = "MIT" | |||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=2970203aedf9e829edb96a137a4fe81b" | 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=2970203aedf9e829edb96a137a4fe81b" |
| 8 | 8 | ||
| 9 | SRC_URI = "git://github.com/bats-core/bats-core.git \ | 9 | SRC_URI = "git://github.com/bats-core/bats-core.git \ |
| 10 | file://0001-install.sh-consider-multilib.patch \ | ||
| 10 | " | 11 | " |
| 11 | # v1.3.0 | 12 | # v1.3.0 |
| 12 | SRCREV = "9086c47854652f2731861b40385689c85f12103f" | 13 | SRCREV = "9086c47854652f2731861b40385689c85f12103f" |
| @@ -15,7 +16,7 @@ S = "${WORKDIR}/git" | |||
| 15 | 16 | ||
| 16 | do_install() { | 17 | do_install() { |
| 17 | # Just a bunch of bash scripts to install | 18 | # Just a bunch of bash scripts to install |
| 18 | ${S}/install.sh ${D}${prefix} | 19 | ${S}/install.sh ${D}${prefix} ${baselib} |
| 19 | } | 20 | } |
| 20 | 21 | ||
| 21 | RDEPENDS_${PN} = "bash" | 22 | RDEPENDS_${PN} = "bash" |
diff --git a/meta-oe/recipes-test/bats/files/0001-install.sh-consider-multilib.patch b/meta-oe/recipes-test/bats/files/0001-install.sh-consider-multilib.patch new file mode 100644 index 0000000000..c7393ca2ed --- /dev/null +++ b/meta-oe/recipes-test/bats/files/0001-install.sh-consider-multilib.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 6e3d01f1ff199383b78a7504858c374fbce05f4e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Kai Kang <kai.kang@windriver.com> | ||
| 3 | Date: Thu, 10 Jun 2021 11:11:07 +0800 | ||
| 4 | Subject: [PATCH] install.sh: consider multilib | ||
| 5 | |||
| 6 | It may install files to /usr/lib64 when multilib is enabled. Add an | ||
| 7 | optional parameter for install.sh to support it. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/bats-core/bats-core/pull/452] | ||
| 10 | |||
| 11 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 12 | --- | ||
| 13 | install.sh | 5 +++-- | ||
| 14 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/install.sh b/install.sh | ||
| 17 | index e660866..d91159e 100755 | ||
| 18 | --- a/install.sh | ||
| 19 | +++ b/install.sh | ||
| 20 | @@ -4,6 +4,7 @@ set -e | ||
| 21 | |||
| 22 | BATS_ROOT="${0%/*}" | ||
| 23 | PREFIX="$1" | ||
| 24 | +BASELIB="${2:-lib}" | ||
| 25 | |||
| 26 | if [[ -z "$PREFIX" ]]; then | ||
| 27 | printf '%s\n' \ | ||
| 28 | @@ -12,10 +13,10 @@ if [[ -z "$PREFIX" ]]; then | ||
| 29 | exit 1 | ||
| 30 | fi | ||
| 31 | |||
| 32 | -install -d -m 755 "$PREFIX"/{bin,libexec/bats-core,lib/bats-core,share/man/man{1,7}} | ||
| 33 | +install -d -m 755 "$PREFIX"/{bin,libexec/bats-core,${BASELIB}/bats-core,share/man/man{1,7}} | ||
| 34 | install -m 755 "$BATS_ROOT/bin"/* "$PREFIX/bin" | ||
| 35 | install -m 755 "$BATS_ROOT/libexec/bats-core"/* "$PREFIX/libexec/bats-core" | ||
| 36 | -install -m 755 "$BATS_ROOT/lib/bats-core"/* "$PREFIX/lib/bats-core" | ||
| 37 | +install -m 755 "$BATS_ROOT/lib/bats-core"/* "$PREFIX/${BASELIB}/bats-core" | ||
| 38 | install -m 644 "$BATS_ROOT/man/bats.1" "$PREFIX/share/man/man1" | ||
| 39 | install -m 644 "$BATS_ROOT/man/bats.7" "$PREFIX/share/man/man7" | ||
| 40 | |||
| 41 | -- | ||
| 42 | 2.17.1 | ||
| 43 | |||
