Bug 12913 - _remove does not work when the item to be removed contains variables
Summary: _remove does not work when the item to be removed contains variables
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.6 M4
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-09-03 16:22 UTC by Alexander Kanavin
Modified: 2018-10-18 12:41 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kanavin 2018-09-03 16:22:49 UTC
E.g. like this:

RDEPENDS_${PN}-ptest = "${PN}-misc make perl perl-module-filehandle bc"

# Uncommenting either of these lines does not trigger a re-packaging, even though it should!
#RDEPENDS_${PN}-ptest_remove = "${PN}-misc"
#RDEPENDS_${PN}-ptest_remove = "openssl-misc"

Reproducer here:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=akanavin/_remove-issue&id=82e1a90765024ec7184803cbab9267f38dcf532d
Comment 1 Richard Purdie 2018-10-14 12:29:41 UTC
I'm a bit puzzled by this as I can't get it to reproduce for me. I only had openssl 1.1.1 available so I tweaked:

-RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
+RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python ${PN}-misc"

and was then adding or removing:
 
RDEPENDS_${PN}-ptest_remove = "${PN}-misc"

$ bitbake openssl -e | egrep BASEHASH.*do_package=\|^RDEPENDS_.*ptest=
BB_BASEHASH_task-do_package="5b6024c21bda4980f65a5deffd5e9f61"
RDEPENDS_openssl-ptest=" perl-module-file-spec-functions bash python openssl-misc"

$ bitbake openssl -e | egrep BASEHASH.*do_package=\|^RDEPENDS_.*ptest=
BB_BASEHASH_task-do_package="452b08f55a52830fa97efab8ac473cb8"
RDEPENDS_openssl-ptest="perl-module-file-spec-functions bash python"

and RDEPENDS changes as expected, as does the BASEHASH. If the hash of the task changes, it should rebuild (repackage in this case). 

Given that, is there more info you can give to reproduce this? Was this with master or one of the stable branches?
Comment 2 Richard Purdie 2018-10-14 12:53:41 UTC
I was able to reproduce but not consistently, something very odd is going on :(
Comment 3 Richard Purdie 2018-10-16 19:56:08 UTC
There were two issues, one was whitespace being squashed by any _remove operator, active or inactive. The other was _remove operators not being cached correctly. I've sent patches for both.