Patchwork [2/2] pkg-stats: fix proper identification of package infrastructure

login
register
mail settings
Submitter Jerzy Grzegorek
Date Sept. 11, 2013, 9:12 a.m.
Message ID <1378890739-3788-2-git-send-email-jerzy.grzegorek@trzebnica.net>
Download mbox | patch
Permalink /patch/274205/
State Rejected
Headers show

Comments

Jerzy Grzegorek - Sept. 11, 2013, 9:12 a.m.
Typically each package invokes the macro which generates the Makefile code, in the way
like this: e.g. $(eval $(generic-package)) or $(eval $(autotools-package)) ,
but a few packages have to invoke this macro in other way:
$(eval $(call generic-package)) e.g. dhcpcd.mk
$(eval $(call autotools-package)) e.g. wireshark.mk .
This patch make changes to fix proper identification of package infrastructure.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
---
 support/scripts/pkg-stats |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Thomas De Schampheleire - Sept. 11, 2013, 9:53 a.m.
Hi,

On Wed, Sep 11, 2013 at 11:12 AM, Jerzy Grzegorek
<jerzy.grzegorek@trzebnica.net> wrote:
> Typically each package invokes the macro which generates the Makefile code, in the way
> like this: e.g. $(eval $(generic-package)) or $(eval $(autotools-package)) ,
> but a few packages have to invoke this macro in other way:
> $(eval $(call generic-package)) e.g. dhcpcd.mk
> $(eval $(call autotools-package)) e.g. wireshark.mk .

I rather think that the 'call' is an accident. Arnout removed the need
for the extra $(call) in July 2012, with commit
e1502ebc0c92763896c53d405ee9c7c7a1a33e24, and both dhcpcd and
wireshark were added after that time. So I think this has been missed
during code review.

A quick search shows only three packages with a remaining $(eval
$(call)) construct: dhcpcd, wireshark, jquery-keyboard.
So I'd rather fix those packages...

Best regards,
Thomas
Peter Korsgaard - Sept. 11, 2013, 11:06 a.m.
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:

 Thomas> Hi,
 Thomas> On Wed, Sep 11, 2013 at 11:12 AM, Jerzy Grzegorek
 Thomas> <jerzy.grzegorek@trzebnica.net> wrote:
 >> Typically each package invokes the macro which generates the Makefile code, in the way
 >> like this: e.g. $(eval $(generic-package)) or $(eval $(autotools-package)) ,
 >> but a few packages have to invoke this macro in other way:
 >> $(eval $(call generic-package)) e.g. dhcpcd.mk
 >> $(eval $(call autotools-package)) e.g. wireshark.mk .

 Thomas> I rather think that the 'call' is an accident. Arnout removed the need
 Thomas> for the extra $(call) in July 2012, with commit
 Thomas> e1502ebc0c92763896c53d405ee9c7c7a1a33e24, and both dhcpcd and
 Thomas> wireshark were added after that time. So I think this has been missed
 Thomas> during code review.

 Thomas> A quick search shows only three packages with a remaining $(eval
 Thomas> $(call)) construct: dhcpcd, wireshark, jquery-keyboard.
 Thomas> So I'd rather fix those packages...

Agreed, I've fixed those in git now.
Jerzy Grzegorek - Sept. 11, 2013, 11:24 a.m.
Hi Thomas,

Thanks for the feedback.

> Hi,
>
> On Wed, Sep 11, 2013 at 11:12 AM, Jerzy Grzegorek
> <jerzy.grzegorek@trzebnica.net> wrote:
>> Typically each package invokes the macro which generates the Makefile code, in the way
>> like this: e.g. $(eval $(generic-package)) or $(eval $(autotools-package)) ,
>> but a few packages have to invoke this macro in other way:
>> $(eval $(call generic-package)) e.g. dhcpcd.mk
>> $(eval $(call autotools-package)) e.g. wireshark.mk .
> I rather think that the 'call' is an accident. Arnout removed the need
> for the extra $(call) in July 2012, with commit
> e1502ebc0c92763896c53d405ee9c7c7a1a33e24, and both dhcpcd and
> wireshark were added after that time. So I think this has been missed
> during code review.
>
> A quick search shows only three packages with a remaining $(eval
> $(call)) construct: dhcpcd, wireshark, jquery-keyboard.
> So I'd rather fix those packages...

Ah, I understand now.

Regards,
Jerzy
>
> Best regards,
> Thomas
>

Patch

diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 4effa59..e982d9c 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -118,7 +118,7 @@  for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do
 	hashost=1
     fi
 
-    if grep -E "\(autotools-package\)" $i > /dev/null ; then
+    if grep -E "autotools-package\)" $i > /dev/null ; then
 	infratype="autotools"
 	hastarget=1
     fi
@@ -128,7 +128,7 @@  for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do
 	hashost=1
     fi
 
-    if grep -E "\(generic-package\)" $i > /dev/null ; then
+    if grep -E "generic-package\)" $i > /dev/null ; then
 	infratype="generic"
 	hastarget=1
     fi