* [Buildroot] [PATCH] support/scripts/pkg-stats: extract current commit id, not master
@ 2019-08-29 7:22 Thomas Petazzoni
2019-08-29 7:29 ` Baruch Siach
2019-09-12 17:09 ` Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-08-29 7:22 UTC (permalink / raw)
To: buildroot
pkg-stats extracts the Buildroot commit id from which the package
information was collected. However, when doing so, it always assumes
we're using the master branch, by running "git log master".
But in fact, pkg-stats can be run from any branch/tag, so it makes a
lot more sense to use "git log HEAD".
Cc: victor.huesca at bootlin.com
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
As was discussed with Baruch and others, the page at
http://autobuild.buildroot.net/stats/ now shows the results
corresponding to the next branch when such a branch exists. However,
the commit ID currently shown at the bottom of the page is incorrect,
as it shows the one of the master branch at the time the page was
generated.
---
support/scripts/pkg-stats | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 992c2dd7c5..6cb3a6a038 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -727,7 +727,7 @@ def __main__():
else:
package_list = None
date = datetime.datetime.utcnow()
- commit = subprocess.check_output(['git', 'log', 'master', '-n', '1',
+ commit = subprocess.check_output(['git', 'log', 'HEAD', '-n', '1',
'--pretty=format:%H']).splitlines()[0]
print("Build package list ...")
packages = get_pkglist(args.npackages, package_list)
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] support/scripts/pkg-stats: extract current commit id, not master
2019-08-29 7:22 [Buildroot] [PATCH] support/scripts/pkg-stats: extract current commit id, not master Thomas Petazzoni
@ 2019-08-29 7:29 ` Baruch Siach
2019-09-12 17:10 ` Thomas Petazzoni
2019-09-12 17:09 ` Thomas Petazzoni
1 sibling, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2019-08-29 7:29 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Thu, Aug 29 2019, Thomas Petazzoni wrote:
> pkg-stats extracts the Buildroot commit id from which the package
> information was collected. However, when doing so, it always assumes
> we're using the master branch, by running "git log master".
>
> But in fact, pkg-stats can be run from any branch/tag, so it makes a
> lot more sense to use "git log HEAD".
>
> Cc: victor.huesca at bootlin.com
> Cc: Baruch Siach <baruch@tkos.co.il>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> As was discussed with Baruch and others, the page at
> http://autobuild.buildroot.net/stats/ now shows the results
> corresponding to the next branch when such a branch exists. However,
> the commit ID currently shown at the bottom of the page is incorrect,
> as it shows the one of the master branch at the time the page was
> generated.
> ---
> support/scripts/pkg-stats | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
> index 992c2dd7c5..6cb3a6a038 100755
> --- a/support/scripts/pkg-stats
> +++ b/support/scripts/pkg-stats
> @@ -727,7 +727,7 @@ def __main__():
> else:
> package_list = None
> date = datetime.datetime.utcnow()
> - commit = subprocess.check_output(['git', 'log', 'master', '-n', '1',
> + commit = subprocess.check_output(['git', 'log', 'HEAD', '-n', '1',
> '--pretty=format:%H']).splitlines()[0]
Unrelated to this patch, commit id retrieval can be simplified to just:
git rev-parse HEAD
baruch
> print("Build package list ...")
> packages = get_pkglist(args.npackages, package_list)
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] support/scripts/pkg-stats: extract current commit id, not master
2019-08-29 7:22 [Buildroot] [PATCH] support/scripts/pkg-stats: extract current commit id, not master Thomas Petazzoni
2019-08-29 7:29 ` Baruch Siach
@ 2019-09-12 17:09 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-09-12 17:09 UTC (permalink / raw)
To: buildroot
On Thu, 29 Aug 2019 09:22:33 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> pkg-stats extracts the Buildroot commit id from which the package
> information was collected. However, when doing so, it always assumes
> we're using the master branch, by running "git log master".
>
> But in fact, pkg-stats can be run from any branch/tag, so it makes a
> lot more sense to use "git log HEAD".
>
> Cc: victor.huesca at bootlin.com
> Cc: Baruch Siach <baruch@tkos.co.il>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> As was discussed with Baruch and others, the page at
> http://autobuild.buildroot.net/stats/ now shows the results
> corresponding to the next branch when such a branch exists. However,
> the commit ID currently shown at the bottom of the page is incorrect,
> as it shows the one of the master branch at the time the page was
> generated.
> ---
> support/scripts/pkg-stats | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] support/scripts/pkg-stats: extract current commit id, not master
2019-08-29 7:29 ` Baruch Siach
@ 2019-09-12 17:10 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-09-12 17:10 UTC (permalink / raw)
To: buildroot
On Thu, 29 Aug 2019 10:29:29 +0300
Baruch Siach <baruch@tkos.co.il> wrote:
> Unrelated to this patch, commit id retrieval can be simplified to just:
>
> git rev-parse HEAD
Good point, I sent a follow-up patch doing exactly this. Thanks for the
suggestion!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-12 17:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-29 7:22 [Buildroot] [PATCH] support/scripts/pkg-stats: extract current commit id, not master Thomas Petazzoni
2019-08-29 7:29 ` Baruch Siach
2019-09-12 17:10 ` Thomas Petazzoni
2019-09-12 17:09 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox