All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] buildinfo: Added buildinfo recipe
@ 2014-10-10 18:29 Alejandro Hernandez
  2014-10-10 22:27 ` Otavio Salvador
  2014-10-11  8:53 ` Koen Kooi
  0 siblings, 2 replies; 4+ messages in thread
From: Alejandro Hernandez @ 2014-10-10 18:29 UTC (permalink / raw)
  To: openembedded-core

Writes build information to target filesystem to help developers

[YOCTO #6770]

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
 meta/recipes-extended/buildinfo/buildinfo_0.1.bb | 34 ++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 meta/recipes-extended/buildinfo/buildinfo_0.1.bb

diff --git a/meta/recipes-extended/buildinfo/buildinfo_0.1.bb b/meta/recipes-extended/buildinfo/buildinfo_0.1.bb
new file mode 100644
index 0000000..b299efb
--- /dev/null
+++ b/meta/recipes-extended/buildinfo/buildinfo_0.1.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "Writing build information on target filesystem"
+SECTION = "MISC"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+PR = "r0"
+
+inherit buildhistory
+
+def buildinfo_target(d):
+        # Get context
+        if d.getVar('BB_WORKERCONTEXT', True) != '1':
+                return ""
+        # Single and list variables to be read
+        vars = "DISTRO DISTRO_VERSION BB_VERSION BUILD_SYS TARGET_SYS MACHINE USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL PACKAGE_EXCLUDE"
+        listvars = "USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL PACKAGE_EXCLUDE"
+        return outputvars(vars, listvars, d)
+
+do_install() {
+        # Write info to file
+        cat > build <<END
+-----------------------
+Build Configuration:  |
+-----------------------
+${@buildinfo_target(d)}
+-----------------------
+Layer Revisions:      |
+-----------------------
+${@buildhistory_get_metadata_revs(d)}
+END
+
+        # Install file with right permissions
+	install -d ${D}${sysconfdir}
+	install -m 0444 build ${D}${sysconfdir}
+}
-- 
1.9.1



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

* Re: [PATCH] buildinfo: Added buildinfo recipe
  2014-10-10 18:29 [PATCH] buildinfo: Added buildinfo recipe Alejandro Hernandez
@ 2014-10-10 22:27 ` Otavio Salvador
  2014-10-11  8:53 ` Koen Kooi
  1 sibling, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2014-10-10 22:27 UTC (permalink / raw)
  To: Alejandro Hernandez; +Cc: Patches and discussions about the oe-core layer

On Fri, Oct 10, 2014 at 3:29 PM, Alejandro Hernandez
<alejandro.hernandez@linux.intel.com> wrote:
> Writes build information to target filesystem to help developers
>
> [YOCTO #6770]
>
> Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
> ---
>  meta/recipes-extended/buildinfo/buildinfo_0.1.bb | 34 ++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
>  create mode 100644 meta/recipes-extended/buildinfo/buildinfo_0.1.bb
>
> diff --git a/meta/recipes-extended/buildinfo/buildinfo_0.1.bb b/meta/recipes-extended/buildinfo/buildinfo_0.1.bb
> new file mode 100644
> index 0000000..b299efb
> --- /dev/null
> +++ b/meta/recipes-extended/buildinfo/buildinfo_0.1.bb
> @@ -0,0 +1,34 @@
> +DESCRIPTION = "Writing build information on target filesystem"
> +SECTION = "MISC"

MISC? I'd use base.

> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> +PR = "r0"

Don't set PR please.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] buildinfo: Added buildinfo recipe
  2014-10-10 18:29 [PATCH] buildinfo: Added buildinfo recipe Alejandro Hernandez
  2014-10-10 22:27 ` Otavio Salvador
@ 2014-10-11  8:53 ` Koen Kooi
  2014-10-14 16:32   ` Burton, Ross
  1 sibling, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2014-10-11  8:53 UTC (permalink / raw)
  To: Alejandro Hernandez; +Cc: openembedded-core


Op 10 okt. 2014, om 20:29 heeft Alejandro Hernandez <alejandro.hernandez@linux.intel.com> het volgende geschreven:

> Writes build information to target filesystem to help developers
> 
> [YOCTO #6770]
> 
> Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
> ---
> meta/recipes-extended/buildinfo/buildinfo_0.1.bb | 34 ++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
> create mode 100644 meta/recipes-extended/buildinfo/buildinfo_0.1.bb
> 
> diff --git a/meta/recipes-extended/buildinfo/buildinfo_0.1.bb b/meta/recipes-extended/buildinfo/buildinfo_0.1.bb
> new file mode 100644
> index 0000000..b299efb
> --- /dev/null
> +++ b/meta/recipes-extended/buildinfo/buildinfo_0.1.bb
> @@ -0,0 +1,34 @@
> +DESCRIPTION = "Writing build information on target filesystem"
> +SECTION = "MISC"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> +PR = "r0"

PR isn't used anymore


> +
> +inherit buildhistory
> +
> +def buildinfo_target(d):
> +        # Get context
> +        if d.getVar('BB_WORKERCONTEXT', True) != '1':
> +                return ""
> +        # Single and list variables to be read
> +        vars = "DISTRO DISTRO_VERSION BB_VERSION BUILD_SYS TARGET_SYS MACHINE USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL PACKAGE_EXCLUDE"
> +        listvars = "USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL PACKAGE_EXCLUDE"

Don't use IMAGE* vars in package recipes, that breaks the orthogonality of the OE system.

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

* Re: [PATCH] buildinfo: Added buildinfo recipe
  2014-10-11  8:53 ` Koen Kooi
@ 2014-10-14 16:32   ` Burton, Ross
  0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2014-10-14 16:32 UTC (permalink / raw)
  To: Alejandro Hernandez; +Cc: Koen Kooi, OE-core

On 11 October 2014 09:53, Koen Kooi <koen@dominion.thruhere.net> wrote:
> Don't use IMAGE* vars in package recipes, that breaks the orthogonality of the OE system.

To expand on what Koen said, you shouldn't use image-specific
variables in a package as then the package can't be re-used in
multiple images.  At best you'll end up rebuilding the package every
time an image is created, at worst images will have incorrect
buildinfo.

Instead, implement this functionality as an optional image creation
postprocess hook.

Ross


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

end of thread, other threads:[~2014-10-14 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-10 18:29 [PATCH] buildinfo: Added buildinfo recipe Alejandro Hernandez
2014-10-10 22:27 ` Otavio Salvador
2014-10-11  8:53 ` Koen Kooi
2014-10-14 16:32   ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.