Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix for YB6502
@ 2014-07-09  9:08 Roxana Ciobanu
  0 siblings, 0 replies; 6+ messages in thread
From: Roxana Ciobanu @ 2014-07-09  9:08 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 6879c3c903ec7d08cf0240281c83d85b4a42b6db:

  maintainers.inc: add info for libical (2014-07-08 11:20:14 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib roxana/YB6502
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=roxana/YB6502

Roxana Ciobanu (1):
  image.bbclass: add ROOTFS_POSTPROCESS_COMMAND to rootfs[vardeps]

 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/1] Fix for YB6502
@ 2014-07-18 13:20 Roxana Ciobanu
  2014-07-18 13:20 ` [PATCH 1/1] image.bbclass/rootfs.py: add variables to rootfs[vardeps] Roxana Ciobanu
  0 siblings, 1 reply; 6+ messages in thread
From: Roxana Ciobanu @ 2014-07-18 13:20 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 0662aa801237ac716e35c7930d857f98249db1cf:

  bdwgc: Add PACKAGECONFIG for libatomic-ops (2014-07-17 15:04:10 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib roxana/YB6502
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=roxana/YB6502

Roxana Ciobanu (1):
  image.bbclass/rootfs.py: add variables to rootfs[vardeps]

 meta/classes/image.bbclass | 17 ++++++++++++++++-
 meta/lib/oe/rootfs.py      | 21 +++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] image.bbclass/rootfs.py: add variables to rootfs[vardeps]
  2014-07-18 13:20 [PATCH 0/1] Fix for YB6502 Roxana Ciobanu
@ 2014-07-18 13:20 ` Roxana Ciobanu
  2014-07-18 14:25   ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Roxana Ciobanu @ 2014-07-18 13:20 UTC (permalink / raw)
  To: openembedded-core

Added base variables and package backend specific variables to
rootfs[vardeps] in order for rootfs to rebuild when changes are made.

Set some variables as [func] to inform bitbake that they are shell
scripts, so that it invokes its shell dependency parsing. Without
marking them as functions, changes in the actual function body would
not trigger rootfs rebuilds.

[YOCTO #6502]

Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
---
 meta/classes/image.bbclass | 17 ++++++++++++++++-
 meta/lib/oe/rootfs.py      | 21 +++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index a03b880..5dd0bde 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -72,10 +72,25 @@ LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot"
 LDCONFIGDEPEND_libc-uclibc = ""
 LDCONFIGDEPEND_libc-musl = ""
 
+python () {
+    variables = ['ROOTFS_POSTPROCESS_COMMAND', 'OPKG_PREPROCESS_COMMANDS', 'OPKG_POSTPROCESS_COMMANDS', 'IMAGE_POSTPROCESS_COMMAND', 'IMAGE_PREPROCESS_COMMAND', 'POPULATE_SDK_POST_HOST_COMMAND', 'POPULATE_SDK_POST_TARGET_COMMAND', 'SDK_POSTPROCESS_COMMAND']
+    for var in variables:
+        d.appendVarFlag(var, 'func', '1')
+}
+
 do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
 do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_packagedata"
-do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS"
+
+def rootfs_variables(d):
+    from oe.rootfs import variable_depends
+    deps =  variable_depends(d)
+    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 IMAGE_ROOTFS_MAXSIZE IMAGE_NAME IMAGE_LINK_NAME IMAGE_MANIFEST DEPLOY_DIR_IMAGE RM_OLD_IMAGE IMAGE_FSTYPES IMAGE_PREPROCESS_COMMAND IMAGE_POSTPROCESS_COMMAND IMAGE_INSTALL_COMPLEMENTARY IMAGE_LINGUAS SDK_OS SDK_OUTPUT SDKPATHNATIVE SDKTARGETSYSROOT SDK_DIR SDK_POSTPROCESS_COMMAND SDK_VENDOR SDKIMAGE_INSTALL_COMPLEMENTARY POPULATE_SDK_POST_TARGET_COMMAND POPULATE_SDK_POST_HOST_COMMAND SDK_PACKAGE_ARCHS SDK_OUTPUT SDKTARGETSYSROOT MULTILIBRE_ALLOW_REP MULTILIB_TEMP_ROOTFS MULTILIB_VARIANTS MULTILIBS ALL_MULTILIB_PACKAGE_ARCHS MULTILIB_GLOBAL_VARIANTS ROOTFS_POSTINSTALL_COMMAND ROOTFS_PREPROCESS_COMMAND ROOTFS_POSTPROCESS_COMMAND BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_ARCHS PACKAGE_CLASSES "
+    # keep line under 998 characters
+    variables += "TARGET_VENDOR TARGET_VENDOR TARGET_ARCH TARGET_OS OVERRIDES BBEXTENDVARIANT FEED_DEPLOYDIR_BASE_URI INTERCEPT_DIR BUILDNAME USE_DEVFS STAGING_KERNEL_DIR COMPRESSIONTYPES"
+    return ' '.join([variables, deps])
+
+do_rootfs[vardeps] += "${@rootfs_variables(d)}"
 
 do_build[depends] += "virtual/kernel:do_deploy"
 
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index bc2524f..e0560ff 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -327,6 +327,10 @@ class RpmRootfs(Rootfs):
 
         self.pm.rpm_setup_smart_target_config()
 
+    @staticmethod
+    def _depends_list():
+        return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS', 'RPM_POSTPROCESS_COMMANDS']
+
     def _get_delayed_postinsts(self):
         postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts")
         if os.path.isdir(postinst_dir):
@@ -417,6 +421,10 @@ class DpkgRootfs(Rootfs):
 
         self.pm.run_pre_post_installs()
 
+    @staticmethod
+    def _depends_list():
+        return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMAND']
+
     def _get_delayed_postinsts(self):
         pkg_list = []
         with open(self.image_rootfs + "/var/lib/dpkg/status") as status:
@@ -679,6 +687,10 @@ class OpkgRootfs(Rootfs):
         if self.inc_opkg_image_gen == "1":
             self.pm.backup_packaging_data()
 
+    @staticmethod
+    def _depends_list():
+        return ['IPKGCONF_SDK', 'IPK_FEED_URIS', 'DEPLOY_DIR_IPK', 'IPKGCONF_TARGET', 'INC_IPK_IMAGE_GEN', 'OPKG_ARGS', 'OPKGLIBDIR', 'OPKG_PREPROCESS_COMMANDS', 'OPKG_POSTPROCESS_COMMANDS', 'OPKGLIBDIR']
+
     def _get_delayed_postinsts(self):
         pkg_list = []
         status_file = os.path.join(self.image_rootfs,
@@ -722,6 +734,15 @@ class OpkgRootfs(Rootfs):
     def _cleanup(self):
         pass
 
+def get_class_for_type(imgtype):
+    return {"rpm": RpmRootfs,
+            "ipk": OpkgRootfs,
+            "deb": DpkgRootfs}[imgtype]
+
+def variable_depends(d, manifest_dir=None):
+    img_type = d.getVar('IMAGE_PKGTYPE', True)
+    cls = get_class_for_type(img_type)
+    return " ".join(cls._depends_list())
 
 def create_rootfs(d, manifest_dir=None):
     env_bkp = os.environ.copy()
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] image.bbclass/rootfs.py: add variables to rootfs[vardeps]
  2014-07-18 13:20 ` [PATCH 1/1] image.bbclass/rootfs.py: add variables to rootfs[vardeps] Roxana Ciobanu
@ 2014-07-18 14:25   ` Burton, Ross
  0 siblings, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2014-07-18 14:25 UTC (permalink / raw)
  To: Roxana Ciobanu; +Cc: OE-core

On 18 July 2014 14:20, Roxana Ciobanu <roxana.ciobanu@intel.com> wrote:
> +def rootfs_variables(d):
> +    from oe.rootfs import variable_depends
> +    deps =  variable_depends(d)
> +    variables = "IMAGE_DEVICE_TABLES BUILD_IMAGES_FROM_FEEDS IMAGE_TYPEDEP_ IMAGE_TYPES_MASKED IMAGE_ROOTFS_ALIGNMENT
[snip]
NO_RECOMMENDATIONS PACKAGE_ARCHS PACKAGE_CLASSES "
> +    # keep line under 998 characters
> +    variables += "TARGET_VENDOR TARGET_VENDOR TARGET_ARCH TARGET_OS OVERRIDES BBEXTENDVARIANT FEED_DEPLOYDIR_BASE_URI INTERCEPT_DIR BUILDNAME USE_DEVFS STAGING_KERNEL_DIR COMPRESSIONTYPES"
> +    return ' '.join([variables, deps])

So a neater way of doing this would be to do:

  variables = ['BUILD_IMAGES_FROM_FEEDS', 'PACKAGE_ARCHS', (etc)]

This list can be wrapped appropriately so that it doesn't take up a
few pages and also isn't a single massive line.

Then add the variable from the rootfs with:

  variables.extend(variable_depends())
  return " ".join(variables)

> +def variable_depends(d, manifest_dir=None):
> +    img_type = d.getVar('IMAGE_PKGTYPE', True)
> +    cls = get_class_for_type(img_type)
> +    return " ".join(cls._depends_list())

If the above change happens then this should return the list, not a
joined string.

Ross


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/1] Fix for YB6502
@ 2014-07-21  9:15 Roxana Ciobanu
  0 siblings, 0 replies; 6+ messages in thread
From: Roxana Ciobanu @ 2014-07-21  9:15 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 4d2ac6f6df2b3ef98699dd4f7afadb2d994222bb:

  rootfs: Remove the extraneous install directory (2014-07-19 00:18:21 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib roxana/YB6502
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=roxana/YB6502

Roxana Ciobanu (1):
  image.bbclass/rootfs.py: add variables to rootfs[vardeps]

 meta/classes/image.bbclass | 21 ++++++++++++++++++++-
 meta/lib/oe/rootfs.py      | 21 +++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/1] Fix for YB6502
@ 2014-07-21 15:55 Roxana Ciobanu
  0 siblings, 0 replies; 6+ messages in thread
From: Roxana Ciobanu @ 2014-07-21 15:55 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 4d2ac6f6df2b3ef98699dd4f7afadb2d994222bb:

  rootfs: Remove the extraneous install directory (2014-07-19 00:18:21 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib roxana/YB6502
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=roxana/YB6502

Roxana Ciobanu (1):
  image.bbclass/rootfs.py: add variables to rootfs[vardeps]

 meta/classes/image.bbclass | 27 ++++++++++++++++++++++++++-
 meta/lib/oe/rootfs.py      | 21 +++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-21 15:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 13:20 [PATCH 0/1] Fix for YB6502 Roxana Ciobanu
2014-07-18 13:20 ` [PATCH 1/1] image.bbclass/rootfs.py: add variables to rootfs[vardeps] Roxana Ciobanu
2014-07-18 14:25   ` Burton, Ross
  -- strict thread matches above, loose matches on Subject: below --
2014-07-21 15:55 [PATCH 0/1] Fix for YB6502 Roxana Ciobanu
2014-07-21  9:15 Roxana Ciobanu
2014-07-09  9:08 Roxana Ciobanu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox