* [PATCH 0/2] Buildhistory sorting fixes v2
@ 2012-02-07 18:14 Paul Eggleton
2012-02-07 18:14 ` [PATCH 1/2] classes/buildhistory: sort image file list Paul Eggleton
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-02-07 18:14 UTC (permalink / raw)
To: openembedded-core
v2 fixes incorrect variable name and removes the erroneous sorting of
PACKAGES (for which the original order *is* significant).
The following changes since commit 18d9fcfc4bc4b01f73e89f3b988c9d3d543c7705:
libzypp: add missing runtime dependences on gzip and gnupg (2012-02-03 17:23:28 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/buildhistory-fix3
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/buildhistory-fix3
Paul Eggleton (2):
classes/buildhistory: sort image file list
classes/buildhistory: sort list fields in package info
meta/classes/buildhistory.bbclass | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
--
1.7.5.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] classes/buildhistory: sort image file list
2012-02-07 18:14 [PATCH 0/2] Buildhistory sorting fixes v2 Paul Eggleton
@ 2012-02-07 18:14 ` Paul Eggleton
2012-02-07 18:14 ` [PATCH 2/2] classes/buildhistory: sort list fields in package info Paul Eggleton
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-02-07 18:14 UTC (permalink / raw)
To: openembedded-core
Sort the contents of files-in-image.txt to avoid unnecessary changes
showing up in the history due to reordering.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/buildhistory.bbclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 69a9d02..3964247 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -310,7 +310,7 @@ buildhistory_get_image_installed() {
buildhistory_get_imageinfo() {
# List the files in the image, but exclude date/time etc.
# This awk script is somewhat messy, but handles where the size is not printed for device files under pseudo
- ( cd ${IMAGE_ROOTFS} && find . -ls | awk '{ if ( $7 ~ /[0-9]/ ) printf "%s %10-s %10-s %10s %s %s %s\n", $3, $5, $6, $7, $11, $12, $13 ; else printf "%s %10-s %10-s %10s %s %s %s\n", $3, $5, $6, 0, $10, $11, $12 }' > ${BUILDHISTORY_DIR_IMAGE}/files-in-image.txt )
+ ( cd ${IMAGE_ROOTFS} && find . -ls | awk '{ if ( $7 ~ /[0-9]/ ) printf "%s %10-s %10-s %10s %s %s %s\n", $3, $5, $6, $7, $11, $12, $13 ; else printf "%s %10-s %10-s %10s %s %s %s\n", $3, $5, $6, 0, $10, $11, $12 }' | sort -k5 > ${BUILDHISTORY_DIR_IMAGE}/files-in-image.txt )
# Record some machine-readable meta-information about the image
echo -n > ${BUILDHISTORY_DIR_IMAGE}/image-info.txt
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] classes/buildhistory: sort list fields in package info
2012-02-07 18:14 [PATCH 0/2] Buildhistory sorting fixes v2 Paul Eggleton
2012-02-07 18:14 ` [PATCH 1/2] classes/buildhistory: sort image file list Paul Eggleton
@ 2012-02-07 18:14 ` Paul Eggleton
2012-02-08 8:41 ` [PATCH 0/2] Buildhistory sorting fixes v2 Koen Kooi
2012-02-08 10:56 ` Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-02-07 18:14 UTC (permalink / raw)
To: openembedded-core
Sort DEPENDS, RDEPENDS, and RRECOMMENDS in package info files so that
any changes in order (which are not important) are smoothed out in the
change history.
Fixes [YOCTO #1961]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/buildhistory.bbclass | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3964247..1b6b249 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -126,6 +126,17 @@ python buildhistory_emit_pkghistory() {
def squashspaces(string):
return re.sub("\s+", " ", string)
+ def sortpkglist(string):
+ pkgiter = re.finditer(r'[a-zA-Z0-9.-]+( \([><=]+ [^ )]+\))?', string, 0)
+ pkglist = [p.group(0) for p in pkgiter]
+ pkglist.sort()
+ return ' '.join(pkglist)
+
+ def sortlist(string):
+ items = string.split(' ')
+ items.sort()
+ return ' '.join(items)
+
pn = d.getVar('PN', True)
pe = d.getVar('PE', True) or "0"
pv = d.getVar('PV', True)
@@ -136,7 +147,7 @@ python buildhistory_emit_pkghistory() {
rcpinfo.pe = pe
rcpinfo.pv = pv
rcpinfo.pr = pr
- rcpinfo.depends = squashspaces(d.getVar('DEPENDS', True) or "")
+ rcpinfo.depends = sortlist(squashspaces(d.getVar('DEPENDS', True) or ""))
rcpinfo.packages = packages
write_recipehistory(rcpinfo, d)
write_latestlink(None, pe, pv, pr, d)
@@ -164,8 +175,8 @@ python buildhistory_emit_pkghistory() {
pkginfo.pe = pe
pkginfo.pv = pv
pkginfo.pr = pr
- pkginfo.rdepends = squashspaces(getpkgvar(pkg, 'RDEPENDS') or "")
- pkginfo.rrecommends = squashspaces(getpkgvar(pkg, 'RRECOMMENDS') or "")
+ pkginfo.rdepends = sortpkglist(squashspaces(getpkgvar(pkg, 'RDEPENDS') or ""))
+ pkginfo.rrecommends = sortpkglist(squashspaces(getpkgvar(pkg, 'RRECOMMENDS') or ""))
pkginfo.files = squashspaces(getpkgvar(pkg, 'FILES') or "")
# Gather information about packaged files
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] Buildhistory sorting fixes v2
2012-02-07 18:14 [PATCH 0/2] Buildhistory sorting fixes v2 Paul Eggleton
2012-02-07 18:14 ` [PATCH 1/2] classes/buildhistory: sort image file list Paul Eggleton
2012-02-07 18:14 ` [PATCH 2/2] classes/buildhistory: sort list fields in package info Paul Eggleton
@ 2012-02-08 8:41 ` Koen Kooi
2012-02-08 10:56 ` Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Koen Kooi @ 2012-02-08 8:41 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Op 7 feb. 2012, om 19:14 heeft Paul Eggleton het volgende geschreven:
> v2 fixes incorrect variable name and removes the erroneous sorting of
> PACKAGES (for which the original order *is* significant).
>
> The following changes since commit 18d9fcfc4bc4b01f73e89f3b988c9d3d543c7705:
>
> libzypp: add missing runtime dependences on gzip and gnupg (2012-02-03 17:23:28 +0000)
>
> are available in the git repository at:
> git://git.openembedded.org/openembedded-core-contrib paule/buildhistory-fix3
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/buildhistory-fix3
>
> Paul Eggleton (2):
> classes/buildhistory: sort image file list
> classes/buildhistory: sort list fields in package info
Those work beautifully: https://github.com/Angstrom-distribution/buildhistory/commit/6f5de74027b6c28458c5767b8a30b64a271c5b90
regards,
Koen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] Buildhistory sorting fixes v2
2012-02-07 18:14 [PATCH 0/2] Buildhistory sorting fixes v2 Paul Eggleton
` (2 preceding siblings ...)
2012-02-08 8:41 ` [PATCH 0/2] Buildhistory sorting fixes v2 Koen Kooi
@ 2012-02-08 10:56 ` Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2012-02-08 10:56 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2012-02-07 at 18:14 +0000, Paul Eggleton wrote:
> v2 fixes incorrect variable name and removes the erroneous sorting of
> PACKAGES (for which the original order *is* significant).
>
> The following changes since commit 18d9fcfc4bc4b01f73e89f3b988c9d3d543c7705:
>
> libzypp: add missing runtime dependences on gzip and gnupg (2012-02-03 17:23:28 +0000)
>
> are available in the git repository at:
> git://git.openembedded.org/openembedded-core-contrib paule/buildhistory-fix3
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/buildhistory-fix3
>
> Paul Eggleton (2):
> classes/buildhistory: sort image file list
> classes/buildhistory: sort list fields in package info
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-02-08 11:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-07 18:14 [PATCH 0/2] Buildhistory sorting fixes v2 Paul Eggleton
2012-02-07 18:14 ` [PATCH 1/2] classes/buildhistory: sort image file list Paul Eggleton
2012-02-07 18:14 ` [PATCH 2/2] classes/buildhistory: sort list fields in package info Paul Eggleton
2012-02-08 8:41 ` [PATCH 0/2] Buildhistory sorting fixes v2 Koen Kooi
2012-02-08 10:56 ` Richard Purdie
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.