[meta-security] apparmor: fix warning of remove operator combined with +=

Message ID 20211119070612.28233-1-kai.kang@windriver.com
State New
Headers show
Series [meta-security] apparmor: fix warning of remove operator combined with += | expand

Commit Message

Kai Nov. 19, 2021, 7:06 a.m. UTC
From: Kai Kang <kai.kang@windriver.com>

Fix warning for apparmor:

| WARNING: /path/to/meta-security/recipes-mac/AppArmor/apparmor_3.0.1.bb:
|  RDEPENDS:${PN}:remove += is not a recommended operator combination,
|  please replace it.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 recipes-mac/AppArmor/apparmor_3.0.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

akuster808 Nov. 29, 2021, 12:17 a.m. UTC | #1
On 11/18/21 11:06 PM, kai wrote:
> From: Kai Kang <kai.kang@windriver.com>
>
> Fix warning for apparmor:
>
> | WARNING: /path/to/meta-security/recipes-mac/AppArmor/apparmor_3.0.1.bb:
> |  RDEPENDS:${PN}:remove += is not a recommended operator combination,
> |  please replace it.
thanks,
merged.

>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  recipes-mac/AppArmor/apparmor_3.0.1.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/recipes-mac/AppArmor/apparmor_3.0.1.bb b/recipes-mac/AppArmor/apparmor_3.0.1.bb
> index 389e72a..818be15 100644
> --- a/recipes-mac/AppArmor/apparmor_3.0.1.bb
> +++ b/recipes-mac/AppArmor/apparmor_3.0.1.bb
> @@ -168,7 +168,7 @@ RDEPENDS:${PN}:libc-glibc +=  "glibc-utils"
>  
>  # Add coreutils and findutils only if sysvinit scripts are in use
>  RDEPENDS:${PN} +=  "${@["coreutils findutils", ""][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'systemd')]} ${@bb.utils.contains('PACKAGECONFIG','python','python3-core python3-modules','', d)}"
> -RDEPENDS:${PN}:remove += "${@bb.utils.contains('PACKAGECONFIG','perl','','perl', d)}"
> +RDEPENDS:${PN}:remove = "${@bb.utils.contains('PACKAGECONFIG','perl','','perl', d)}"
>  RDEPENDS:${PN}-ptest += "perl coreutils dbus-lib bash"
>  
>  INSANE_SKIP:${PN} = "ldflags"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#55369): https://lists.yoctoproject.org/g/yocto/message/55369
> Mute This Topic: https://lists.yoctoproject.org/mt/87162916/3616698
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [akuster808@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

Patch

diff --git a/recipes-mac/AppArmor/apparmor_3.0.1.bb b/recipes-mac/AppArmor/apparmor_3.0.1.bb
index 389e72a..818be15 100644
--- a/recipes-mac/AppArmor/apparmor_3.0.1.bb
+++ b/recipes-mac/AppArmor/apparmor_3.0.1.bb
@@ -168,7 +168,7 @@  RDEPENDS:${PN}:libc-glibc +=  "glibc-utils"
 
 # Add coreutils and findutils only if sysvinit scripts are in use
 RDEPENDS:${PN} +=  "${@["coreutils findutils", ""][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'systemd')]} ${@bb.utils.contains('PACKAGECONFIG','python','python3-core python3-modules','', d)}"
-RDEPENDS:${PN}:remove += "${@bb.utils.contains('PACKAGECONFIG','perl','','perl', d)}"
+RDEPENDS:${PN}:remove = "${@bb.utils.contains('PACKAGECONFIG','perl','','perl', d)}"
 RDEPENDS:${PN}-ptest += "perl coreutils dbus-lib bash"
 
 INSANE_SKIP:${PN} = "ldflags"