diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-27 23:30:30 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-30 11:37:03 +0000 |
commit | 5410aff5a9f3c05a86d1fde9949b7be6b2745879 (patch) | |
tree | a95ea191d6165cc2e926a5fb7bca53251dc07c19 /meta/classes/sstate.bbclass | |
parent | 9823802ab07655aa2907363dbcc274996d3bbc11 (diff) | |
download | poky-5410aff5a9f3c05a86d1fde9949b7be6b2745879.tar.gz |
sstate: Improve handling of useradd dependencies
useradd has sstate [depends] for both do_package and do_populate_sysroot
yet the dependency validation code only covers do_package.
Add coverage of populate_sysroot, else the order inversion that [depends]
creates means unexpected installation of users of useradd.bbclass (e.g.
avahi do_populate_sysroot) in cases where it shouldn't be (e.g.
libnss-mdns -c packagedata).
The code needs to move above the other populate_sysroot intercept code
since there are specific cases we need to cover before that code.
The result of this change is more optimal installation of sstate objects
in common usage scenarios.
(From OE-Core rev: 21368b4a7934b3a199e61c1072416fd5c091e5ff)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 295e033802..ec72c5506d 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -876,6 +876,11 @@ def setscene_depvalid(task, taskdependees, notneeded, d): | |||
876 | if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package', 'do_package_qa']: | 876 | if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package', 'do_package_qa']: |
877 | continue | 877 | continue |
878 | 878 | ||
879 | # This is due to the [depends] in useradd.bbclass complicating matters | ||
880 | # The logic *is* reversed here due to the way hard setscene dependencies are injected | ||
881 | if (taskdependees[task][1] == 'do_package' or taskdependees[task][1] == 'do_populate_sysroot') and taskdependees[dep][0].endswith(('shadow-native', 'shadow-sysroot', 'base-passwd', 'pseudo-native')) and taskdependees[dep][1] == 'do_populate_sysroot': | ||
882 | continue | ||
883 | |||
879 | # Consider sysroot depending on sysroot tasks | 884 | # Consider sysroot depending on sysroot tasks |
880 | if taskdependees[task][1] == 'do_populate_sysroot' and taskdependees[dep][1] == 'do_populate_sysroot': | 885 | if taskdependees[task][1] == 'do_populate_sysroot' and taskdependees[dep][1] == 'do_populate_sysroot': |
881 | # base-passwd/shadow-sysroot don't need their dependencies | 886 | # base-passwd/shadow-sysroot don't need their dependencies |
@@ -902,10 +907,6 @@ def setscene_depvalid(task, taskdependees, notneeded, d): | |||
902 | if taskdependees[dep][1] == "do_populate_lic": | 907 | if taskdependees[dep][1] == "do_populate_lic": |
903 | continue | 908 | continue |
904 | 909 | ||
905 | # This is due to the [depends] in useradd.bbclass complicating matters | ||
906 | # The logic *is* reversed here due to the way hard setscene dependencies are injected | ||
907 | if taskdependees[task][1] == 'do_package' and taskdependees[dep][0].endswith(('shadow-native', 'shadow-sysroot', 'base-passwd', 'pseudo-native')) and taskdependees[dep][1] == 'do_populate_sysroot': | ||
908 | continue | ||
909 | 910 | ||
910 | # Safe fallthrough default | 911 | # Safe fallthrough default |
911 | bb.debug(2, " Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep]))) | 912 | bb.debug(2, " Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep]))) |