* [PATCH V2] Modify buildstats to be merged inside buildhistory
@ 2014-01-06 17:12 Corneliu Stoicescu
2014-01-08 17:31 ` Saul Wold
2014-01-08 17:36 ` Richard Purdie
0 siblings, 2 replies; 4+ messages in thread
From: Corneliu Stoicescu @ 2014-01-06 17:12 UTC (permalink / raw)
To: openembedded-core
- added buildstats inheritance inside buildhistory
- when buildhisory is used, buildstats will be moved inside the buildhistory directory
---
meta/classes/buildhistory.bbclass | 3 +++
meta/classes/buildstats.bbclass | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index e9a9c3b..54efecfe 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -16,9 +16,12 @@ BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
BUILDHISTORY_COMMIT ?= "0"
BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
BUILDHISTORY_PUSH_REPO ?= ""
+BUILDSTATS_BASE = "${BUILDHISTORY_DIR}/buildstats"
SSTATEPOSTINSTFUNCS += "buildhistory_emit_pkghistory"
+inherit buildstats
+
#
# Write out metadata about this package for comparision when writing future packages
#
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 72fff11..c8769ae 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -1,4 +1,4 @@
-BUILDSTATS_BASE = "${TMPDIR}/buildstats/"
+BUILDSTATS_BASE ??= "${TMPDIR}/buildstats/"
BNFILE = "${BUILDSTATS_BASE}/.buildname"
DEVFILE = "${BUILDSTATS_BASE}/.device"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2] Modify buildstats to be merged inside buildhistory
2014-01-06 17:12 [PATCH V2] Modify buildstats to be merged inside buildhistory Corneliu Stoicescu
@ 2014-01-08 17:31 ` Saul Wold
2014-01-08 17:36 ` Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Saul Wold @ 2014-01-08 17:31 UTC (permalink / raw)
To: Corneliu Stoicescu, openembedded-core
On 01/06/2014 09:12 AM, Corneliu Stoicescu wrote:
> - added buildstats inheritance inside buildhistory
> - when buildhisory is used, buildstats will be moved inside the buildhistory directory
This does not seem to have a Signed-off-by:
Please submit a v2 for review.
Thanks
Sau!
> ---
> meta/classes/buildhistory.bbclass | 3 +++
> meta/classes/buildstats.bbclass | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index e9a9c3b..54efecfe 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -16,9 +16,12 @@ BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
> BUILDHISTORY_COMMIT ?= "0"
> BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
> BUILDHISTORY_PUSH_REPO ?= ""
> +BUILDSTATS_BASE = "${BUILDHISTORY_DIR}/buildstats"
>
> SSTATEPOSTINSTFUNCS += "buildhistory_emit_pkghistory"
>
> +inherit buildstats
> +
> #
> # Write out metadata about this package for comparision when writing future packages
> #
> diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
> index 72fff11..c8769ae 100644
> --- a/meta/classes/buildstats.bbclass
> +++ b/meta/classes/buildstats.bbclass
> @@ -1,4 +1,4 @@
> -BUILDSTATS_BASE = "${TMPDIR}/buildstats/"
> +BUILDSTATS_BASE ??= "${TMPDIR}/buildstats/"
> BNFILE = "${BUILDSTATS_BASE}/.buildname"
> DEVFILE = "${BUILDSTATS_BASE}/.device"
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] Modify buildstats to be merged inside buildhistory
2014-01-06 17:12 [PATCH V2] Modify buildstats to be merged inside buildhistory Corneliu Stoicescu
2014-01-08 17:31 ` Saul Wold
@ 2014-01-08 17:36 ` Richard Purdie
2014-01-09 10:46 ` Stoicescu, CorneliuX
1 sibling, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2014-01-08 17:36 UTC (permalink / raw)
To: Corneliu Stoicescu; +Cc: openembedded-core
On Mon, 2014-01-06 at 18:12 +0100, Corneliu Stoicescu wrote:
> - added buildstats inheritance inside buildhistory
> - when buildhisory is used, buildstats will be moved inside the buildhistory directory
> ---
> meta/classes/buildhistory.bbclass | 3 +++
> meta/classes/buildstats.bbclass | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index e9a9c3b..54efecfe 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -16,9 +16,12 @@ BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
> BUILDHISTORY_COMMIT ?= "0"
> BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
> BUILDHISTORY_PUSH_REPO ?= ""
> +BUILDSTATS_BASE = "${BUILDHISTORY_DIR}/buildstats"
>
> SSTATEPOSTINSTFUNCS += "buildhistory_emit_pkghistory"
>
> +inherit buildstats
> +
I don't think we need this inherit line. The user can still decide
whether to include it or not, if it is included, it can be under
buildhistory control. So it should be safe simply to remove it.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] Modify buildstats to be merged inside buildhistory
2014-01-08 17:36 ` Richard Purdie
@ 2014-01-09 10:46 ` Stoicescu, CorneliuX
0 siblings, 0 replies; 4+ messages in thread
From: Stoicescu, CorneliuX @ 2014-01-09 10:46 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core@lists.openembedded.org
> > --- a/meta/classes/buildhistory.bbclass
> > +++ b/meta/classes/buildhistory.bbclass
> > @@ -16,9 +16,12 @@ BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd
> /etc/group"
> > BUILDHISTORY_COMMIT ?= "0"
> > BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory
> <buildhistory@${DISTRO}>"
> > BUILDHISTORY_PUSH_REPO ?= ""
> > +BUILDSTATS_BASE = "${BUILDHISTORY_DIR}/buildstats"
> >
> > SSTATEPOSTINSTFUNCS += "buildhistory_emit_pkghistory"
> >
> > +inherit buildstats
> > +
>
> I don't think we need this inherit line. The user can still decide whether to
> include it or not, if it is included, it can be under buildhistory control. So it
> should be safe simply to remove it.
>
Removing this inherit and using the manual suggested steps to activate buildhistory in local.conf:
"
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"
"
Will result in buildhistory being inherited before buildstats:
"
cornel@NODE1:~/SSD/poky/build$ bitbake -e | grep 'INHERIT='
INHERIT=" buildhistory poky-sanity package_rpm buildstats image-mklibs image-prelink debian devshell sstate license sanity"
"
This will cause part of the build_stats file(which is written at the end of the build) to be left out of the commits when git is used for buildhistory:
"
cornel@NODE1:~/SSD/poky/build/buildhistory$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: buildstats/core-image-minimal-qemux86-64/201401091123/build_stats
#
no changes added to commit (use "git add" and/or "git commit -a")
"
An easy way to avoid this is to activate buildhistory by adding it after buildstats in USER_CLASSES in local.conf:
"
USER_CLASSES ?= "buildstats image-mklibs image-prelink buildhistory"
"
Or
"
USER_CLASSES += "buildhistory"
"
So in order to make this work, we either change the suggested way to enable buildhistory or find a workaround in code.
Regards,
Corneliu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-09 10:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-06 17:12 [PATCH V2] Modify buildstats to be merged inside buildhistory Corneliu Stoicescu
2014-01-08 17:31 ` Saul Wold
2014-01-08 17:36 ` Richard Purdie
2014-01-09 10:46 ` Stoicescu, CorneliuX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox