* [PATCH] image.bbclass: add do_rootfs vardeps for IMAGE_{CMD, TYPEDEP}_*
@ 2015-09-14 21:38 Christopher Larson
2015-09-14 23:41 ` Christopher Larson
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Larson @ 2015-09-14 21:38 UTC (permalink / raw)
To: openembedded-core; +Cc: Christopher Larson
From: Christopher Larson <chris_larson@mentor.com>
We want do_rootfs to rerun if the image commands or dependencies change for any of
our configured fstypes (IMGE_FSTYPES).
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
meta/classes/image.bbclass | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index fc7d64d..d81fa27 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -106,14 +106,36 @@ python () {
d.setVarFlag(var, 'func', '1')
}
+def fstype_variables(d):
+ fstype_vars = set()
+ fstypes = set(d.getVar('IMAGE_FSTYPES', True).split())
+ def _typedeps(fstype, seen):
+ if fstype in seen:
+ return
+
+ yield fstype
+ for typedep in (d.getVar('IMAGE_TYPEDEP_%s' % fstype, True) or "").split():
+ for _typedep in _typedeps(typedep, seen):
+ yield _typedep
+
+ seen = set()
+ for fstype in list(fstypes):
+ fstypes |= set(_typedeps(fstype, seen))
+
+ for fstype in fstypes:
+ fstype_vars.add('IMAGE_TYPEDEP_%s' % fstype)
+ fstype_vars.add('IMAGE_CMD_%s' % fstype)
+ return sorted(fstype_vars)
+
def rootfs_variables(d):
from oe.rootfs import variable_depends
- variables = ['IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPEDEP_','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
+ variables = ['IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS','SDK_OS',
'SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT','SDKTARGETSYSROOT','MULTILIBRE_ALLOW_REP',
'MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS','PACKAGE_ARCHS',
'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS']
+ variables.extend(fstype_variables(d))
variables.extend(command_variables(d))
variables.extend(variable_depends(d))
return " ".join(variables)
--
2.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] image.bbclass: add do_rootfs vardeps for IMAGE_{CMD, TYPEDEP}_*
2015-09-14 21:38 [PATCH] image.bbclass: add do_rootfs vardeps for IMAGE_{CMD, TYPEDEP}_* Christopher Larson
@ 2015-09-14 23:41 ` Christopher Larson
2015-09-15 0:12 ` Christopher Larson
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Larson @ 2015-09-14 23:41 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson
[-- Attachment #1: Type: text/plain, Size: 596 bytes --]
On Mon, Sep 14, 2015 at 2:38 PM, Christopher Larson <kergoth@gmail.com>
wrote:
> From: Christopher Larson <chris_larson@mentor.com>
>
> We want do_rootfs to rerun if the image commands or dependencies change
> for any of
> our configured fstypes (IMGE_FSTYPES).
>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
>
Hold off on accepting this, need to account compression types and
COMPRESS_CMD. Expect a v2.
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 1112 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] image.bbclass: add do_rootfs vardeps for IMAGE_{CMD, TYPEDEP}_*
2015-09-14 23:41 ` Christopher Larson
@ 2015-09-15 0:12 ` Christopher Larson
0 siblings, 0 replies; 3+ messages in thread
From: Christopher Larson @ 2015-09-15 0:12 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
On Mon, Sep 14, 2015 at 4:41 PM, Christopher Larson <chris_larson@mentor.com
> wrote:
> On Mon, Sep 14, 2015 at 2:38 PM, Christopher Larson <kergoth@gmail.com>
> wrote:
>
>> From: Christopher Larson <chris_larson@mentor.com>
>>
>> We want do_rootfs to rerun if the image commands or dependencies change
>> for any of
>> our configured fstypes (IMGE_FSTYPES).
>>
>> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
>>
>
> Hold off on accepting this, need to account compression types and
> COMPRESS_CMD. Expect a v2.
'[PATCH] image.bbclass: add do_rootfs vardeps for {COMPRESS,IMAGE}_CMD_*'
is submitted, and supercedes this.
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 1711 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-15 0:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 21:38 [PATCH] image.bbclass: add do_rootfs vardeps for IMAGE_{CMD, TYPEDEP}_* Christopher Larson
2015-09-14 23:41 ` Christopher Larson
2015-09-15 0:12 ` Christopher Larson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox