* [PATCH 1/3] buildhistory: remove duplicate entries from dot graph
@ 2012-03-31 22:06 Koen Kooi
2012-03-31 22:06 ` [PATCH 2/3] buildhistory: record all builds Koen Kooi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Koen Kooi @ 2012-03-31 22:06 UTC (permalink / raw)
To: openembedded-core; +Cc: Koen Kooi
There are various conditions that lead to duplicate entries in the dot graph which need to get fixed, but this patch is a catchall. A previous attempt to address this only works on rpm which gives a \n seperated output, opkg doesn't.
Another benefit is that the sort order is now know, leading to less spurious diffs in buildhistory commits.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
meta/classes/buildhistory.bbclass | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index f99aa7f..386c32c 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -300,16 +300,16 @@ buildhistory_get_image_installed() {
echo $pkgsize $pkg >> ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp
fi
- deps=`list_package_depends $pkg | sort | uniq`
+ deps=`list_package_depends $pkg`
for dep in $deps ; do
- echo "$pkg OPP $dep;" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g' >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
+ echo "$pkg OPP $dep;" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g'
done
- recs=`list_package_recommends $pkg | sort | uniq`
+ recs=`list_package_recommends $pkg`
for rec in $recs ; do
- echo "$pkg OPP $rec [style=dotted];" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g' >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
+ echo "$pkg OPP $rec [style=dotted];" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g'
done
- done
+ done | sort | uniq >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
echo "}" >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
cat ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}' > ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.txt
--
1.7.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] buildhistory: record all builds
2012-03-31 22:06 [PATCH 1/3] buildhistory: remove duplicate entries from dot graph Koen Kooi
@ 2012-03-31 22:06 ` Koen Kooi
2012-03-31 22:06 ` [PATCH 3/3] buildhistory: make seperate commits for every changed top level entry in the buildhistory dir Koen Kooi
2012-04-03 23:40 ` [PATCH 1/3] buildhistory: remove duplicate entries from dot graph Saul Wold
2 siblings, 0 replies; 4+ messages in thread
From: Koen Kooi @ 2012-03-31 22:06 UTC (permalink / raw)
To: openembedded-core; +Cc: Koen Kooi
When nothing has changed an empty commit prefixed with "No changes" will get generated so that the commit log of the buildhistory repo provides a complete log of all builds performed, not just those that resulted in changes.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
meta/classes/buildhistory.bbclass | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 386c32c..2224340 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -405,6 +405,8 @@ buildhistory_commit() {
if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
git push -q ${BUILDHISTORY_PUSH_REPO}
fi
+ else
+ git commit ${BUILDHISTORY_DIR}/ --allow-empty -m "No changes: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
fi) || true
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] buildhistory: make seperate commits for every changed top level entry in the buildhistory dir
2012-03-31 22:06 [PATCH 1/3] buildhistory: remove duplicate entries from dot graph Koen Kooi
2012-03-31 22:06 ` [PATCH 2/3] buildhistory: record all builds Koen Kooi
@ 2012-03-31 22:06 ` Koen Kooi
2012-04-03 23:40 ` [PATCH 1/3] buildhistory: remove duplicate entries from dot graph Saul Wold
2 siblings, 0 replies; 4+ messages in thread
From: Koen Kooi @ 2012-03-31 22:06 UTC (permalink / raw)
To: openembedded-core; +Cc: Koen Kooi
This seperates out image changes from package changes making the image diffs a lot easier to read.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
meta/classes/buildhistory.bbclass | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 2224340..8d5b096 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -401,7 +401,10 @@ buildhistory_commit() {
if [ "$repostatus" != "" ] ; then
git add ${BUILDHISTORY_DIR}/*
HOSTNAME=`hostname 2>/dev/null || echo unknown`
- git commit ${BUILDHISTORY_DIR}/ -m "Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
+ # porcelain output looks like "?? packages/foo/bar"
+ for entry in `echo $repostatus | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
+ git commit ${BUILDHISTORY_DIR}/$entry -m "$entry: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
+ done
if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
git push -q ${BUILDHISTORY_PUSH_REPO}
fi
--
1.7.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] buildhistory: remove duplicate entries from dot graph
2012-03-31 22:06 [PATCH 1/3] buildhistory: remove duplicate entries from dot graph Koen Kooi
2012-03-31 22:06 ` [PATCH 2/3] buildhistory: record all builds Koen Kooi
2012-03-31 22:06 ` [PATCH 3/3] buildhistory: make seperate commits for every changed top level entry in the buildhistory dir Koen Kooi
@ 2012-04-03 23:40 ` Saul Wold
2 siblings, 0 replies; 4+ messages in thread
From: Saul Wold @ 2012-04-03 23:40 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Koen Kooi
On 03/31/2012 03:06 PM, Koen Kooi wrote:
> There are various conditions that lead to duplicate entries in the dot graph which need to get fixed, but this patch is a catchall. A previous attempt to address this only works on rpm which gives a \n seperated output, opkg doesn't.
>
> Another benefit is that the sort order is now know, leading to less spurious diffs in buildhistory commits.
>
> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
> ---
> meta/classes/buildhistory.bbclass | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index f99aa7f..386c32c 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -300,16 +300,16 @@ buildhistory_get_image_installed() {
> echo $pkgsize $pkg>> ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp
> fi
>
> - deps=`list_package_depends $pkg | sort | uniq`
> + deps=`list_package_depends $pkg`
> for dep in $deps ; do
> - echo "$pkg OPP $dep;" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g'>> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
> + echo "$pkg OPP $dep;" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g'
> done
>
> - recs=`list_package_recommends $pkg | sort | uniq`
> + recs=`list_package_recommends $pkg`
> for rec in $recs ; do
> - echo "$pkg OPP $rec [style=dotted];" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g'>> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
> + echo "$pkg OPP $rec [style=dotted];" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g'
> done
> - done
> + done | sort | uniq>> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
> echo "}">> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
>
> cat ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}'> ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.txt
Merged the series of 3 into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-03 23:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-31 22:06 [PATCH 1/3] buildhistory: remove duplicate entries from dot graph Koen Kooi
2012-03-31 22:06 ` [PATCH 2/3] buildhistory: record all builds Koen Kooi
2012-03-31 22:06 ` [PATCH 3/3] buildhistory: make seperate commits for every changed top level entry in the buildhistory dir Koen Kooi
2012-04-03 23:40 ` [PATCH 1/3] buildhistory: remove duplicate entries from dot graph Saul Wold
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.