* [Buildroot] Bug in pkg-stats?
@ 2011-10-04 22:35 H Hartley Sweeten
2011-10-04 23:05 ` H Hartley Sweeten
0 siblings, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2011-10-04 22:35 UTC (permalink / raw)
To: buildroot
Hello all,
The output of pkg-stats shows almost every package with the following status:
AUTOTARGETS GENTARGETS CMAKETARGETS manual
target host target host target host target Actions
NO NO NO NO NO NO NO YES * convert to generic target
I don't think this output is correct but I can't figure out what's wrong
with the script.
Regards,
Hartley
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] Bug in pkg-stats?
2011-10-04 22:35 [Buildroot] Bug in pkg-stats? H Hartley Sweeten
@ 2011-10-04 23:05 ` H Hartley Sweeten
2011-10-05 6:43 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2011-10-04 23:05 UTC (permalink / raw)
To: buildroot
On Tuesday, October 04, 2011 3:36 PM, H Hartley Sweeten wrote:
>
> Hello all,
>
> The output of pkg-stats shows almost every package with the following status:
>
> AUTOTARGETS GENTARGETS CMAKETARGETS manual
> target host target host target host target Actions
> NO NO NO NO NO NO NO YES * convert to generic target
>
> I don't think this output is correct but I can't figure out what's wrong
> with the script.
Thomas,
I think the problem with pkg-stats is due to your patches:
package: remove useless arguments from CMAKETARGETS
package: remove useless arguments from AUTOTARGETS
package: remove useless arguments from GENTARGETS
package: add helper functions to get package name and directory magically
The grep tests are still looking for the package name and directory to
determine the package type.
I'll post a patch shortly.
One other thing with pkg-stats.
Can you think of any way to pull the _VERSION of the packages out of the *.mk
files and show that information in the output html file?
Regards,
Hartley
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] Bug in pkg-stats?
2011-10-04 23:05 ` H Hartley Sweeten
@ 2011-10-05 6:43 ` Thomas Petazzoni
2011-10-05 17:09 ` H Hartley Sweeten
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2011-10-05 6:43 UTC (permalink / raw)
To: buildroot
Le Tue, 4 Oct 2011 18:05:04 -0500,
H Hartley Sweeten <hartleys@visionengravers.com> a ?crit :
> I think the problem with pkg-stats is due to your patches:
>
> package: remove useless arguments from CMAKETARGETS
> package: remove useless arguments from AUTOTARGETS
> package: remove useless arguments from GENTARGETS
> package: add helper functions to get package name and directory
> magically
Yes.
> The grep tests are still looking for the package name and directory to
> determine the package type.
>
> I'll post a patch shortly.
I already have a patch that fixes pkg-stats, which I intend to post
shortly. But if you are quicker than me, no problem :)
> One other thing with pkg-stats.
>
> Can you think of any way to pull the _VERSION of the packages out of
> the *.mk files and show that information in the output html file?
Yes, shouldn't be too difficult. Why would this be useful ?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] Bug in pkg-stats?
2011-10-05 6:43 ` Thomas Petazzoni
@ 2011-10-05 17:09 ` H Hartley Sweeten
2011-10-05 18:36 ` Peter Korsgaard
0 siblings, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2011-10-05 17:09 UTC (permalink / raw)
To: buildroot
On Tuesday, October 04, 2011 11:44 PM, Thomas Petazzoni wrote:
> Le Tue, 4 Oct 2011 18:05:04 -0500,
> H Hartley Sweeten <hartleys@visionengravers.com> a ?crit :
>
>> One other thing with pkg-stats.
>>
>> Can you think of any way to pull the _VERSION of the packages out of
>> the *.mk files and show that information in the output html file?
>
> Yes, shouldn't be too difficult. Why would this be useful ?
It seems convenient. Having the script output the package version would
be nicer than having to look at the various *.mk files be hand to see what
version is actually being used by Buildroot.
I have something "kind" of working right now but its output isn't very
nice for a lot of the packages. I'm doing this in the script:
version=""
if grep -m1 "_VERSION" $i > /dev/null ; then
version=`grep -m1 "_VERSION" $i | awk '{ print $NF }'`
else
version="unknown"
fi
This works fine for the packages that have _VERSION defined like:
FOO_VERSION = x.y.z
But it ends up with the whole line when the spaces are missing around the
'='. Oh well...
Regards,
Hartley
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] Bug in pkg-stats?
2011-10-05 17:09 ` H Hartley Sweeten
@ 2011-10-05 18:36 ` Peter Korsgaard
2011-10-05 18:52 ` H Hartley Sweeten
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2011-10-05 18:36 UTC (permalink / raw)
To: buildroot
>>>>> "H" == H Hartley Sweeten <hartleys@visionengravers.com> writes:
Hi,
H> version=""
H> if grep -m1 "_VERSION" $i > /dev/null ; then
H> version=`grep -m1 "_VERSION" $i | awk '{ print $NF }'`
H> else
H> version="unknown"
H> fi
H> This works fine for the packages that have _VERSION defined like:
H> FOO_VERSION = x.y.z
H> But it ends up with the whole line when the spaces are missing around the
H> '='. Oh well...
You could simply do it awk:
version=$(awk -F'=| ' '/_VERSION/ { print $NF } END { print "unknown" } ' \
$i | head -n 1)
But it naturally still doesn't work for packages with multiple versions
(like busybox) or where version is major.minor (like glib2).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] Bug in pkg-stats?
2011-10-05 18:36 ` Peter Korsgaard
@ 2011-10-05 18:52 ` H Hartley Sweeten
2011-10-05 19:08 ` Peter Korsgaard
0 siblings, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2011-10-05 18:52 UTC (permalink / raw)
To: buildroot
On Wednesday, October 05, 2011 11:37 AM, Peter Korsgaard wrote:
>>>>>> "H" == H Hartley Sweeten <hartleys@visionengravers.com> writes:
>
> Hi,
>
> H> version=""
>
> H> if grep -m1 "_VERSION" $i > /dev/null ; then
> H> version=`grep -m1 "_VERSION" $i | awk '{ print $NF }'`
> H> else
> H> version="unknown"
> H> fi
>
> H> This works fine for the packages that have _VERSION defined like:
>
> H> FOO_VERSION = x.y.z
>
> H> But it ends up with the whole line when the spaces are missing around the
> H> '='. Oh well...
>
> You could simply do it awk:
>
> version=$(awk -F'=| ' '/_VERSION/ { print $NF } END { print "unknown" } ' \
> $i | head -n 1)
I thought there was some way of doing it with awk... I really need to figure
out how that utility works... ;-)
> But it naturally still doesn't work for packages with multiple versions
> (like busybox) or where version is major.minor (like glib2).
With your awk line above, the only packages that show up strange are:
util-linux $(UTIL_LINUX_VERSION_MAJOR)
xenomai qstrip,$(BR2_PACKAGE_XENOMAI_VERSION))
imagemagick $(IMAGEMAGICK_MAJOR)-6
binutils qstrip,$(BR2_BINUTILS_VERSION))
microperl $(MICROPERL_MAJ).8.8
haserl qstrip,$(BR2_PACKAGE_HASERL_VERSION))
And, of course, the ones with version major.minor only show the major version.
Regardless, do you think this patch is worth submitting?
Thanks,
Hartley
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] Bug in pkg-stats?
2011-10-05 18:52 ` H Hartley Sweeten
@ 2011-10-05 19:08 ` Peter Korsgaard
2011-10-06 7:52 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2011-10-05 19:08 UTC (permalink / raw)
To: buildroot
>>>>> "H" == H Hartley Sweeten <hartleys@visionengravers.com> writes:
Hi,
>> version=$(awk -F'=| ' '/_VERSION/ { print $NF } END { print "unknown" } ' \
>> $i | head -n 1)
H> I thought there was some way of doing it with awk... I really need to figure
H> out how that utility works... ;-)
;) It takes a bit of getting used to, but is quite powerful once you get it.
>> But it naturally still doesn't work for packages with multiple versions
>> (like busybox) or where version is major.minor (like glib2).
H> With your awk line above, the only packages that show up strange are:
H> util-linux $(UTIL_LINUX_VERSION_MAJOR)
H> xenomai qstrip,$(BR2_PACKAGE_XENOMAI_VERSION))
H> imagemagick $(IMAGEMAGICK_MAJOR)-6
H> binutils qstrip,$(BR2_BINUTILS_VERSION))
H> microperl $(MICROPERL_MAJ).8.8
H> haserl qstrip,$(BR2_PACKAGE_HASERL_VERSION))
H> And, of course, the ones with version major.minor only show the major version.
H> Regardless, do you think this patch is worth submitting?
Well, I think the info in useful, but as buildroot already knows the
version (except for unconfigured packages), wouldn't it make more sense
to add a <pkg>-version target to GENTARGETS and use that instead?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] Bug in pkg-stats?
2011-10-05 19:08 ` Peter Korsgaard
@ 2011-10-06 7:52 ` Thomas Petazzoni
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2011-10-06 7:52 UTC (permalink / raw)
To: buildroot
Le Wed, 05 Oct 2011 21:08:07 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :
> Well, I think the info in useful, but as buildroot already knows the
> version (except for unconfigured packages), wouldn't it make more
> sense to add a <pkg>-version target to GENTARGETS and use that
> instead?
I agree here. Grepping/seding/awking into the .mk file sounds horrible
and does not work for package that do:
pkg_VERSION = $(pkg_VERSION_MAJOR).5
So, yes, if you want to do this, please add a <pkg>-show-version in
GENTARGETS, just as we have <pkg>-show-depends. Of course, this will
slow down quite a bit the pkg-stats script, but we don't really need
this script to be fast.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-10-06 7:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-04 22:35 [Buildroot] Bug in pkg-stats? H Hartley Sweeten
2011-10-04 23:05 ` H Hartley Sweeten
2011-10-05 6:43 ` Thomas Petazzoni
2011-10-05 17:09 ` H Hartley Sweeten
2011-10-05 18:36 ` Peter Korsgaard
2011-10-05 18:52 ` H Hartley Sweeten
2011-10-05 19:08 ` Peter Korsgaard
2011-10-06 7:52 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox