From patchwork Mon Jan 8 14:52:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856841 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="e8RLpq3+"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdld5nVXz9ryT for ; Tue, 9 Jan 2018 02:01:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ekPrpVJZtklk0DccPznWY0ZnUf7HPG4+kRQDcWlgH0g=; b=e8RLpq3+6rZUhVXM6ufAsVtvij vfpA1iX6/ICcH7/a1nfevI+X7eJZPwQf7hpHgOrGpkio+7IiuobcYHaBFvKBCFY5auzppXBMZuD9U LpbrLQTZQTYerwJIsd7NKG+InozC4eI28UoQfCmlMcjAbul6GM5tot5H8hlIwAh5SiT1+d7n9Lx8W 9cosJmiFz1xCZqGVAdzkxy3zxIBmQa+MO8GrpiDyb0EXrrbOR6LeUIw69HgqsbIZR/WxrQGi20YJa 99LpE7PBSkgQ+SagLdoH5SRiFE+A84ZAOwzddVmySzUOGidYoQa0J9hh12bDJqXQ+kj5y6NEP+Sl+ K6k22F6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYvi-0004gj-AF; Mon, 08 Jan 2018 15:01:38 +0000 Received: from orthanc.universe-factory.net ([104.238.176.138]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002xn-N5 for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:18 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id B602F20468; Mon, 8 Jan 2018 15:52:45 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:14 +0100 Message-Id: <8dcc1f30a14d5f09463417d398f977869ced1134.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065944_768506_3BFD8AD0 X-CRM114-Status: UNSURE ( 7.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 01/15] metadata: remove 'base-files' special case X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Nothing explicitly depends on base-files, and even if it would, it would not cause any problems. Remove the unused special case. Signed-off-by: Matthias Schiffer --- scripts/package-metadata.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index fbd458bf2a..46446e994b 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -539,7 +539,7 @@ sub gen_package_mk() { } elsif (defined($srcpackage{$dep})) { $idx = $subdir{$dep}.$dep; } - undef $idx if $idx eq 'base-files'; + if ($idx) { $idx .= $suffix; From patchwork Mon Jan 8 14:52:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856844 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="shKpyhoe"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdms3vkCz9s0g for ; Tue, 9 Jan 2018 02:02:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=SIW+DeIvo+cLoctnjbpeqR+/HhAmbFqrJFjYglojoV8=; b=shKpyhoeVSYakEKHWqvbzS27Nn BWaLDvYj1eZCt2c1yrQWrgERo01/8/zWrZjeuGnqDg//p3ahGst83Ks8VQQQc+2U9hfOQHYSU1vD8 uQA8H7Gb/q10Z2sQ8c8Cf4ekgdfpsd4PBbPnn9rt4jtWMqzL5sLgpsANSASLyrvUaBkkd58uLvtmX F3F63QiQnpkduzQK1KBJYCT7n8JqQdRoC87VQo8WDq2CszJkDdZdoAypSCgQINQjBoSC8HZp59kud NpRNcSuCoNVlrVwzDhw8CkVxs7gt9J1sgpbO4j6s8zZ0iV7ID0wyBCL/k8UBPvgXhJmQ8zcrspNr5 /78WEVEA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYwp-0005kZ-VD; Mon, 08 Jan 2018 15:02:48 +0000 Received: from orthanc.universe-factory.net ([104.238.176.138]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002vb-Oy for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:28 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id E627220469; Mon, 8 Jan 2018 15:52:45 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:15 +0100 Message-Id: <5a3e92806056c07ac818ca2000189e61150e7d29.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065944_775468_D75DD567 X-CRM114-Status: UNSURE ( 8.54 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 02/15] metadata: make srcpackage extensible X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Turn the srcpackage values into hashes to allow storing more information than just binary package names. Signed-off-by: Matthias Schiffer --- scripts/feeds | 2 +- scripts/metadata.pm | 6 ++++-- scripts/package-metadata.pl | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/feeds b/scripts/feeds index 55c294ad0a..42f7b3b116 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -525,7 +525,7 @@ sub install_package { }; # install all dependencies referenced from the source package - foreach my $vpkg (@{$feed_src->{$src}}) { + foreach my $vpkg (@{$feed_src->{$src}->{packages}}) { foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, @{$vpkg->{"builddepends/host"}}) { next if $dep =~ /@/; $dep =~ s/^\+//; diff --git a/scripts/metadata.pm b/scripts/metadata.pm index d446892e2b..297abc9f12 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -212,7 +212,9 @@ sub parse_package_metadata($) { $src = $3; $subdir =~ s/^package\///; $subdir{$src} = $subdir; - $srcpackage{$src} = []; + $srcpackage{$src} = { + packages => [], + }; $override = ""; undef $pkg; }; @@ -237,7 +239,7 @@ sub parse_package_metadata($) { $pkg->{tristate} = 1; $pkg->{override} = $override; $package{$1} = $pkg; - push @{$srcpackage{$src}}, $pkg; + push @{$srcpackage{$src}->{packages}}, $pkg; }; /^Feature:\s*(.+?)\s*$/ and do { undef $pkg; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 46446e994b..3a176c8024 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -445,7 +445,7 @@ sub gen_package_mk() { print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$pkg->{buildtypes}})."\n"; } - foreach my $spkg (@{$srcpackage{$pkg->{src}}}) { + foreach my $spkg (@{$srcpackage{$pkg->{src}}->{packages}}) { foreach my $dep (@{$spkg->{depends}}, @{$spkg->{builddepends}}) { $dep =~ /@/ or do { $dep =~ s/\+//g; From patchwork Mon Jan 8 14:52:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856838 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mVsVcfAv"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdkB6LJYz9ryT for ; Tue, 9 Jan 2018 02:00:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=jY4LKhQzUXhc/3qTsM6yZNcdw8L/iISgLXzKMwpWlK8=; b=mVsVcfAvJnYNZzubdMmT1NcN8p JmXTX5vgRTm7dNPxCqQ0OMTEYIz9D3CUqKOo5yh5mXbf5GusFuBflUtu+2P56Q+JrUF9bRB1Wkei5 aMw7k2s5rCjqdvVJvDX9Wn1BJExyCVSuzvr5tA+IXR7NchGNmPEf0zLrwn/LaZXu5dg5Tf4MhHf+v xP8K7ZtyJCYrh8KmfuNpy3cJAkh5VnNKl4v1Tk/yaoYdcGj723LSeMdRSUjdC89LZQ7ONABVJHx9v L2cowXc5oHY+DTVpLHzYGkj+s5brptPxGvZ/IL5s9GtR6HVehKztMNDQyeyj9iQoOKG+Cz99UPLkb TJ3TtHAg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYuU-0003WZ-QW; Mon, 08 Jan 2018 15:00:22 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtX-0002l4-Lb for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 14:59:37 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 1FD022046A; Mon, 8 Jan 2018 15:52:46 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:16 +0100 Message-Id: X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065924_629880_6F67BA5D X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 03/15] metadata: move 'buildtypes' from binary to source packages X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Build types are a property of source rather than binary packages. This is a preparation for followup cleanup. Signed-off-by: Matthias Schiffer --- scripts/metadata.pm | 4 ++-- scripts/package-metadata.pl | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/metadata.pm b/scripts/metadata.pm index 297abc9f12..985e6237a6 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -214,6 +214,7 @@ sub parse_package_metadata($) { $subdir{$src} = $subdir; $srcpackage{$src} = { packages => [], + buildtypes => [], }; $override = ""; undef $pkg; @@ -234,7 +235,6 @@ sub parse_package_metadata($) { $pkg->{depends} = []; $pkg->{mdepends} = []; $pkg->{builddepends} = []; - $pkg->{buildtypes} = []; $pkg->{subdir} = $subdir; $pkg->{tristate} = 1; $pkg->{override} = $override; @@ -258,6 +258,7 @@ sub parse_package_metadata($) { /^Feature-Description:/ and $feature->{description} = get_multiline(\*FILE, "\t\t\t"); next; }; + /^Build-Types:\s*(.+)\s*$/ and $srcpackage{$src}->{buildtypes} = [ split /\s+/, $1 ]; next unless $pkg; /^Version: \s*(.+)\s*$/ and $pkg->{version} = $1; /^Title: \s*(.+)\s*$/ and $pkg->{title} = $1; @@ -290,7 +291,6 @@ sub parse_package_metadata($) { /^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1; /^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ]; /^Build-Depends\/(\w+): \s*(.+)\s*$/ and $pkg->{"builddepends/$1"} = [ split /\s+/, $2 ]; - /^Build-Types:\s*(.+)\s*$/ and $pkg->{buildtypes} = [ split /\s+/, $1 ]; /^Repository:\s*(.+?)\s*$/ and $pkg->{repository} = $1; /^Category: \s*(.+)\s*$/ and do { $pkg->{category} = $1; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 3a176c8024..08c2343ade 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -421,6 +421,7 @@ sub gen_package_mk() { foreach my $name (sort {uc($a) cmp uc($b)} keys %package) { my $config; my $pkg = $package{$name}; + my $src = $srcpackage{$pkg->{src}}; my @srcdeps; next if defined $pkg->{vdepends}; @@ -441,11 +442,11 @@ sub gen_package_mk() { next if $done{$pkg->{src}}; $done{$pkg->{src}} = 1; - if (@{$pkg->{buildtypes}} > 0) { - print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$pkg->{buildtypes}})."\n"; + if (@{$src->{buildtypes}} > 0) { + print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$src->{buildtypes}})."\n"; } - foreach my $spkg (@{$srcpackage{$pkg->{src}}->{packages}}) { + foreach my $spkg (@{$src->{packages}}) { foreach my $dep (@{$spkg->{depends}}, @{$spkg->{builddepends}}) { $dep =~ /@/ or do { $dep =~ s/\+//g; @@ -453,7 +454,7 @@ sub gen_package_mk() { }; } } - foreach my $type (@{$pkg->{buildtypes}}) { + foreach my $type (@{$src->{buildtypes}}) { my @extra_deps; my %deplines; @@ -476,7 +477,7 @@ sub gen_package_mk() { my $idx = ""; my $pkg_dep = $package{$dep}; if (defined($pkg_dep) && defined($pkg_dep->{src})) { - unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{buildtypes}}) { + unless (!$deptype || grep { $_ eq $deptype } @{$srcpackage{$pkg_dep->{src}}->{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", $pkg->{makefile}, $type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; next; @@ -530,7 +531,7 @@ sub gen_package_mk() { foreach my $dep (@deps) { $pkg_dep = $package{$deps}; if (defined $pkg_dep->{src}) { - unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{buildtypes}}) { + unless (!$deptype || grep { $_ eq $deptype } @{$srcpackage{$pkg_dep->{src}}->{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", $pkg->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; next; From patchwork Mon Jan 8 14:52:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856854 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Yh0Bf64T"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdrV6vbhz9s7c for ; Tue, 9 Jan 2018 02:06:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/FQPcC/JArAhkjwIZ9+KJq41s5Igs+zcd34xp2pgRKs=; b=Yh0Bf64TthKXUjdoB74XW8W6LD cZ5MTWSSROiA930FjHuo9diPsw0SHRmQxRpmygTYQHJdV3d2cmp/TrMmz78eTFiStsx1kFL9TCMd3 2NKylAw6s7oKKVis8hT4+GjUg7Hy+cNI6uxDRIbHmbZltMTb1VzFArTng9qdfv65WvGAlHqt7IAfG mG/qNP+WrWtPT3uGOnxku84M9z6S/0uqRCLgyBEhe80ccb79DQOB2C9FxGvc7klCFyWL7Rr/tLOUl Y9XJZFnwnFFKkuES3SGNZ7pMK7O7y56d534Bnox4SBAOPSoFhRBVwhJp+F3djQVZLOYwB6a1eN0bl WyTV5v8Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYzn-0000Jt-85; Mon, 08 Jan 2018 15:05:51 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYuc-0003UU-Bo for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:01:57 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 4DB512046B; Mon, 8 Jan 2018 15:52:46 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:17 +0100 Message-Id: X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_070031_880213_BD2C6CC2 X-CRM114-Status: UNSURE ( 8.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 04/15] metadata: move 'builddepends' from binary to source packages X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Matthias Schiffer --- scripts/feeds | 20 +++++++++++--------- scripts/metadata.pm | 6 +++--- scripts/package-metadata.pl | 16 +++++++--------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/feeds b/scripts/feeds index 42f7b3b116..31481edcb1 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -525,15 +525,17 @@ sub install_package { }; # install all dependencies referenced from the source package - foreach my $vpkg (@{$feed_src->{$src}->{packages}}) { - foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, @{$vpkg->{"builddepends/host"}}) { - next if $dep =~ /@/; - $dep =~ s/^\+//; - $dep =~ s/^.+://; - $dep =~ s/\/.+$//; - next unless $dep; - install_package($feed, $dep, 0) == 0 or $ret = 1; - } + foreach my $dep ( + @{$feed_src->{$src}->{builddepends}}, + @{$feed_src->{$src}->{"builddepends/host"}}, + map { @{$_->{depends}} } @{$feed_src->{$src}->{packages}} + ) { + next if $dep =~ /@/; + $dep =~ s/^\+//; + $dep =~ s/^.+://; + $dep =~ s/\/.+$//; + next unless $dep; + install_package($feed, $dep, 0) == 0 or $ret = 1; } return $ret; diff --git a/scripts/metadata.pm b/scripts/metadata.pm index 985e6237a6..c150b547f1 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -215,6 +215,7 @@ sub parse_package_metadata($) { $srcpackage{$src} = { packages => [], buildtypes => [], + builddepends => [], }; $override = ""; undef $pkg; @@ -234,7 +235,6 @@ sub parse_package_metadata($) { $pkg->{title} = ""; $pkg->{depends} = []; $pkg->{mdepends} = []; - $pkg->{builddepends} = []; $pkg->{subdir} = $subdir; $pkg->{tristate} = 1; $pkg->{override} = $override; @@ -258,6 +258,8 @@ sub parse_package_metadata($) { /^Feature-Description:/ and $feature->{description} = get_multiline(\*FILE, "\t\t\t"); next; }; + /^Build-Depends: \s*(.+)\s*$/ and $srcpackage{$src}->{builddepends} = [ split /\s+/, $1 ]; + /^Build-Depends\/(\w+): \s*(.+)\s*$/ and $srcpackage{$src}->{"builddepends/$1"} = [ split /\s+/, $2 ]; /^Build-Types:\s*(.+)\s*$/ and $srcpackage{$src}->{buildtypes} = [ split /\s+/, $1 ]; next unless $pkg; /^Version: \s*(.+)\s*$/ and $pkg->{version} = $1; @@ -289,8 +291,6 @@ sub parse_package_metadata($) { /^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1; /^Default-Variant: .*/ and $pkg->{variant_default} = 1; /^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1; - /^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ]; - /^Build-Depends\/(\w+): \s*(.+)\s*$/ and $pkg->{"builddepends/$1"} = [ split /\s+/, $2 ]; /^Repository:\s*(.+?)\s*$/ and $pkg->{repository} = $1; /^Category: \s*(.+)\s*$/ and do { $pkg->{category} = $1; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 08c2343ade..a6cff40696 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -446,20 +446,18 @@ sub gen_package_mk() { print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$src->{buildtypes}})."\n"; } - foreach my $spkg (@{$src->{packages}}) { - foreach my $dep (@{$spkg->{depends}}, @{$spkg->{builddepends}}) { - $dep =~ /@/ or do { - $dep =~ s/\+//g; - push @srcdeps, $dep; - }; - } + foreach my $dep (@{$src->{builddepends}}, map { @{$_->{depends}} } @{$src->{packages}}) { + $dep =~ /@/ or do { + $dep =~ s/\+//g; + push @srcdeps, $dep; + }; } foreach my $type (@{$src->{buildtypes}}) { my @extra_deps; my %deplines; - next unless $pkg->{"builddepends/$type"}; - foreach my $dep (@{$pkg->{"builddepends/$type"}}) { + next unless $src->{"builddepends/$type"}; + foreach my $dep (@{$src->{"builddepends/$type"}}) { my $suffix = ""; my $deptype = ""; my $condition; From patchwork Mon Jan 8 14:52:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856840 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V7Iw1HE8"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdlG1xmlz9ryT for ; Tue, 9 Jan 2018 02:01:30 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=beNp22NXAS8H8HWnR1avDgWGqHmv5mhYcqMXcUQrhMc=; b=V7Iw1HE8o9nUQFF2zzLEayr6Z0 JJx09SlOiGZwKjH1MLQgtPcd8vj7QPuANhIHWhSVo+5BrBd+wZuTy10oYO4Pl2fpvp1QBPIwRea+H z1yuKFxKlWw773cna7FynTZGtKYeHzCgPAyppo5jNuKqeBtHobtlc2eg3zny3MdF0vUED32QS+Whs AUQLp0oQG/dRJu03VIjvR6JCKc920FaS0uxOpnN2APf3AUBy1MxM3xbIVUYw+aNKwf7GjdmNlJ0NS NKWJPBEP2EkaFVDJ4IJ+xmZCc4QV+NxqD5acFuNizKb6qZmvQH/2aNYjdg21tVQv3VjAN0C2tLRHE 1q5CsOvg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYvL-0004Kp-Qr; Mon, 08 Jan 2018 15:01:15 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtX-0002l7-Mw for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 14:59:38 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 7BA6B2046C; Mon, 8 Jan 2018 15:52:46 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:18 +0100 Message-Id: <19bdf1c953948d8e4e96512974bdb25715dee9b2.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065924_937244_C6B2BD80 X-CRM114-Status: GOOD ( 10.64 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 05/15] metadata: interate over source packages when generating Makefile X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org All build dependencies are between source packages. Interating over source rather than binary packages simplifies parts of the code and prepares further improvement. As a side effect, this changes the implicit default variant of a few packages (the first defined is used now instead of the lexicographically first). Signed-off-by: Matthias Schiffer --- scripts/metadata.pm | 1 + scripts/package-metadata.pl | 61 ++++++++++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/scripts/metadata.pm b/scripts/metadata.pm index c150b547f1..404309dc4e 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -213,6 +213,7 @@ sub parse_package_metadata($) { $subdir =~ s/^package\///; $subdir{$src} = $subdir; $srcpackage{$src} = { + makefile => $makefile, packages => [], buildtypes => [], builddepends => [], diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index a6cff40696..077956e6a1 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -414,36 +414,45 @@ sub get_conditional_dep($$) { sub gen_package_mk() { my %conf; my %dep; - my %done; my $line; parse_package_metadata($ARGV[0]) or exit 1; - foreach my $name (sort {uc($a) cmp uc($b)} keys %package) { - my $config; - my $pkg = $package{$name}; - my $src = $srcpackage{$pkg->{src}}; + foreach my $srcname (sort {uc($a) cmp uc($b)} keys %srcpackage) { + my $src = $srcpackage{$srcname}; + my $path = $subdir{$srcname}.$srcname; + my $variant_default; my @srcdeps; - next if defined $pkg->{vdepends}; + foreach my $pkg (@{$src->{packages}}) { + next if defined $pkg->{vdepends}; + + my $config = ''; + $config = "\$(CONFIG_PACKAGE_$pkg->{name})" unless $pkg->{buildonly}; + + $pkg->{prereq} and print "prereq-$config += $path\n"; + + next if $pkg->{buildonly}; + + print "package-$config += $path\n"; - $config = "\$(CONFIG_PACKAGE_$name)"; - if ($config) { - $pkg->{buildonly} and $config = ""; - print "package-$config += $pkg->{subdir}$pkg->{src}\n"; if ($pkg->{variant}) { - if (!defined($done{$pkg->{src}}) or $pkg->{variant_default}) { - print "\$(curdir)/$pkg->{subdir}$pkg->{src}/default-variant := $pkg->{variant}\n"; + if (!defined($variant_default) or $pkg->{variant_default}) { + $variant_default = $pkg->{variant}; } - print "\$(curdir)/$pkg->{subdir}$pkg->{src}/variants += \$(if $config,$pkg->{variant})\n" + print "\$(curdir)/$path/variants += \$(if $config,$pkg->{variant})\n"; } - $pkg->{prereq} and print "prereq-$config += $pkg->{subdir}$pkg->{src}\n"; } - next if $done{$pkg->{src}}; - $done{$pkg->{src}} = 1; + if (defined($variant_default)) { + print "\$(curdir)/$path/default-variant := $variant_default\n"; + } + + unless (grep {!$_->{buildonly}} @{$src->{packages}}) { + print "package- += $path\n"; + } if (@{$src->{buildtypes}} > 0) { - print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$src->{buildtypes}})."\n"; + print "buildtypes-$path = ".join(' ', @{$src->{buildtypes}})."\n"; } foreach my $dep (@{$src->{builddepends}}, map { @{$_->{depends}} } @{$src->{packages}}) { @@ -477,7 +486,7 @@ sub gen_package_mk() { if (defined($pkg_dep) && defined($pkg_dep->{src})) { unless (!$deptype || grep { $_ eq $deptype } @{$srcpackage{$pkg_dep->{src}}->{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $pkg->{makefile}, $type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; + $src->{makefile}, $type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; next; } $idx = $pkg_dep->{subdir}.$pkg_dep->{src}; @@ -494,7 +503,7 @@ sub gen_package_mk() { } my $depline = join(" ", sort keys %deplines); if ($depline) { - $line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/$type/compile += $depline\n"; + $line .= "\$(curdir)/$path/$type/compile += $depline\n"; } } @@ -531,7 +540,7 @@ sub gen_package_mk() { if (defined $pkg_dep->{src}) { unless (!$deptype || grep { $_ eq $deptype } @{$srcpackage{$pkg_dep->{src}}->{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $pkg->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; + $src->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; next; } $idx = $pkg_dep->{subdir}.$pkg_dep->{src}; @@ -543,17 +552,17 @@ sub gen_package_mk() { $idx .= $suffix; my $depline; - next if $pkg->{src} eq $pkg_dep->{src}.$suffix; - next if $dep{$condition.":".$pkg->{src}."->".$idx}; - next if $dep{$pkg->{src}."->($dep)".$idx} and $pkg_dep->{vdepends}; + next if $srcname eq $pkg_dep->{src}.$suffix; + next if $dep{$condition.":".$srcname."->".$idx}; + next if $dep{$srcname."->($dep)".$idx} and $pkg_dep->{vdepends}; my $depstr; if ($pkg_dep->{vdepends}) { $depstr = "\$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx/compile)"; - $dep{$pkg->{src}."->($dep)".$idx} = 1; + $dep{$srcname."->($dep)".$idx} = 1; } else { $depstr = "\$(curdir)/$idx/compile"; - $dep{$pkg->{src}."->".$idx} = 1; + $dep{$srcname."->".$idx} = 1; } $depline = get_conditional_dep($condition, $depstr); if ($depline) { @@ -564,7 +573,7 @@ sub gen_package_mk() { } my $depline = join(" ", sort keys %deplines); if ($depline) { - $line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/compile += $depline\n"; + $line .= "\$(curdir)/$path/compile += $depline\n"; } } From patchwork Mon Jan 8 14:52:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856839 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BGYI34J+"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdkm1GzBz9ryT for ; Tue, 9 Jan 2018 02:01:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=syQpQcNN5H2gPngn22gci+HKcnZRSXsMewmPgiq2p3I=; b=BGYI34J+0vTD61gdYv7TwipV7V BGQqFa8CzuH1btR81kewB9Sj9eeA1UOagBEIA2KgybRm7bZBToYXtwbRdbFKtvdqSbMwStmHJyvq4 u1ZAlSWckqQPFz2ZBpttak3ki2PR8B2lcALD9bpPJeiN+9f79d4q/o18r8t4ofvPxchqDfP6pe4P8 eRv3mFs+riGyX31Br0J6YyViiHJRdiiLLq00QwbZCQR2X5Sanidtj8hr1gUgVzN0/ZX6VQud20Qsz bg5r991lHOSsdLtxIKnwXqwBTuQuSHikHgfj1RJ4aA3ZuBSP/zqEk36CFQGv/bld9M+XJ2haEU25r QGvrztcg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYux-0003xQ-4I; Mon, 08 Jan 2018 15:00:51 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtX-0002l6-Jb for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 14:59:38 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id A89712046D; Mon, 8 Jan 2018 15:52:46 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:19 +0100 Message-Id: <6ac2562ff76fa02627200e0ac74548b666b98156.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065924_919797_7E5F0D7E X-CRM114-Status: GOOD ( 10.91 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 06/15] metadata: change pkg->{src} field to hold a reference X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We often want to access fields of a source packages through pkg->{src}. Allow accessing them directly instead of resolving the source hash through srcpackages. Signed-off-by: Matthias Schiffer --- scripts/feeds | 4 ++-- scripts/metadata.pm | 51 ++++++++++++++++++++++----------------------- scripts/package-metadata.pl | 14 ++++++------- 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/scripts/feeds b/scripts/feeds index 31481edcb1..b531fbac62 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -494,7 +494,7 @@ sub install_package { warn "WARNING: Package '$name' is not available in feed $feed->[1].\n"; return 0; }; - my $src = $pkg->{src}; + my $src = $pkg->{src}->{name}; my $type = $feed->[0]; $src or $src = $name; @@ -663,7 +663,7 @@ sub uninstall { warn "WARNING: $name not installed\n"; next; }; - $pkg->{src} and $name = $pkg->{src}; + $pkg->{src} and $name = $pkg->{src}->{name}; warn "Uninstalling package '$name'\n"; system("rm -f ./package/feeds/*/$name"); $uninstall = 1; diff --git a/scripts/metadata.pm b/scripts/metadata.pm index 404309dc4e..0577390eda 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -193,9 +193,7 @@ sub parse_package_metadata($) { my $file = shift; my $pkg; my $feature; - my $makefile; my $preconfig; - my $subdir; my $src; my $override; my %ignore = map { $_ => 1 } @ignore; @@ -206,41 +204,42 @@ sub parse_package_metadata($) { }; while () { chomp; - /^Source-Makefile: \s*((.+\/)([^\/]+)\/Makefile)\s*$/ and do { - $makefile = $1; - $subdir = $2; - $src = $3; - $subdir =~ s/^package\///; - $subdir{$src} = $subdir; - $srcpackage{$src} = { - makefile => $makefile, + /^Source-Makefile: \s*(package\/((?:.+\/)?)([^\/]+)\/Makefile)\s*$/ and do { + $subdir{$3} = $2; + + $src = { + makefile => $1, + subdir => $2, + name => $3, + ignore => $ignore{$3}, packages => [], buildtypes => [], builddepends => [], }; + $srcpackage{$3} = $src; $override = ""; undef $pkg; }; /^Override: \s*(.+?)\s*$/ and do { $override = $1; - $overrides{$src} = 1; + $overrides{$src->{name}} = 1; }; next unless $src; /^Package:\s*(.+?)\s*$/ and do { undef $feature; $pkg = {}; - $pkg->{ignore} = $ignore{$src}; + $pkg->{ignore} = $src->{ignore}; $pkg->{src} = $src; - $pkg->{makefile} = $makefile; + $pkg->{makefile} = $src->{makefile}; $pkg->{name} = $1; $pkg->{title} = ""; $pkg->{depends} = []; $pkg->{mdepends} = []; - $pkg->{subdir} = $subdir; + $pkg->{subdir} = $src->{subdir}; $pkg->{tristate} = 1; $pkg->{override} = $override; $package{$1} = $pkg; - push @{$srcpackage{$src}->{packages}}, $pkg; + push @{$src->{packages}}, $pkg; }; /^Feature:\s*(.+?)\s*$/ and do { undef $pkg; @@ -251,7 +250,7 @@ sub parse_package_metadata($) { $feature and do { /^Target-Name:\s*(.+?)\s*$/ and do { $features{$1} or $features{$1} = []; - push @{$features{$1}}, $feature unless $ignore{$src}; + push @{$features{$1}}, $feature unless $src->{ignore}; }; /^Target-Title:\s*(.+?)\s*$/ and $feature->{target_title} = $1; /^Feature-Priority:\s*(\d+)\s*$/ and $feature->{priority} = $1; @@ -259,9 +258,9 @@ sub parse_package_metadata($) { /^Feature-Description:/ and $feature->{description} = get_multiline(\*FILE, "\t\t\t"); next; }; - /^Build-Depends: \s*(.+)\s*$/ and $srcpackage{$src}->{builddepends} = [ split /\s+/, $1 ]; - /^Build-Depends\/(\w+): \s*(.+)\s*$/ and $srcpackage{$src}->{"builddepends/$1"} = [ split /\s+/, $2 ]; - /^Build-Types:\s*(.+)\s*$/ and $srcpackage{$src}->{buildtypes} = [ split /\s+/, $1 ]; + /^Build-Depends: \s*(.+)\s*$/ and $src->{builddepends} = [ split /\s+/, $1 ]; + /^Build-Depends\/(\w+): \s*(.+)\s*$/ and $src->{"builddepends/$1"} = [ split /\s+/, $2 ]; + /^Build-Types:\s*(.+)\s*$/ and $src->{buildtypes} = [ split /\s+/, $1 ]; next unless $pkg; /^Version: \s*(.+)\s*$/ and $pkg->{version} = $1; /^Title: \s*(.+)\s*$/ and $pkg->{title} = $1; @@ -279,8 +278,8 @@ sub parse_package_metadata($) { name => $vpkg, vdepends => [], src => $src, - subdir => $subdir, - makefile => $makefile + subdir => $src->{subdir}, + makefile => $src->{makefile}, }; push @{$package{$vpkg}->{vdepends}}, $pkg->{name}; } @@ -296,8 +295,8 @@ sub parse_package_metadata($) { /^Category: \s*(.+)\s*$/ and do { $pkg->{category} = $1; defined $category{$1} or $category{$1} = {}; - defined $category{$1}->{$src} or $category{$1}->{$src} = []; - push @{$category{$1}->{$src}}, $pkg; + defined $category{$1}->{$src->{name}} or $category{$1}->{$src->{name}} = []; + push @{$category{$1}->{$src->{name}}}, $pkg; }; /^Description: \s*(.*)\s*$/ and $pkg->{description} = "\t\t $1\n". get_multiline(*FILE, "\t\t "); /^Type: \s*(.+)\s*$/ and do { @@ -318,7 +317,7 @@ sub parse_package_metadata($) { $preconfig = { id => $1 }; - $preconfig{$pkgname}->{$1} = $preconfig unless $ignore{$src}; + $preconfig{$pkgname}->{$1} = $preconfig unless $src->{ignore}; } }; /^Preconfig-Type:\s*(.*?)\s*$/ and $preconfig->{type} = $1; @@ -329,9 +328,9 @@ sub parse_package_metadata($) { for my $ugspec (@ugspecs) { my @ugspec = split /:/, $ugspec, 2; - parse_package_metadata_usergroup($makefile, "user", \%usernames, \%userids, $ugspec[0]) or return 0; + parse_package_metadata_usergroup($src->{makefile}, "user", \%usernames, \%userids, $ugspec[0]) or return 0; if (@ugspec > 1) { - parse_package_metadata_usergroup($makefile, "group", \%groupnames, \%groupids, $ugspec[1]) or return 0; + parse_package_metadata_usergroup($src->{makefile}, "group", \%groupnames, \%groupids, $ugspec[1]) or return 0; } } }; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 077956e6a1..2369c37e2b 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -484,12 +484,12 @@ sub gen_package_mk() { my $idx = ""; my $pkg_dep = $package{$dep}; if (defined($pkg_dep) && defined($pkg_dep->{src})) { - unless (!$deptype || grep { $_ eq $deptype } @{$srcpackage{$pkg_dep->{src}}->{buildtypes}}) { + unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}->{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $src->{makefile}, $type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; + $src->{makefile}, $type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{makefile}, $deptype; next; } - $idx = $pkg_dep->{subdir}.$pkg_dep->{src}; + $idx = $pkg_dep->{subdir}.$pkg_dep->{src}->{name}; } elsif (defined($srcpackage{$dep})) { $idx = $subdir{$dep}.$dep; } else { @@ -538,12 +538,12 @@ sub gen_package_mk() { foreach my $dep (@deps) { $pkg_dep = $package{$deps}; if (defined $pkg_dep->{src}) { - unless (!$deptype || grep { $_ eq $deptype } @{$srcpackage{$pkg_dep->{src}}->{buildtypes}}) { + unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}->{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $src->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; + $src->{makefile}, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{makefile}, $deptype; next; } - $idx = $pkg_dep->{subdir}.$pkg_dep->{src}; + $idx = $pkg_dep->{subdir}.$pkg_dep->{src}->{name}; } elsif (defined($srcpackage{$dep})) { $idx = $subdir{$dep}.$dep; } @@ -552,7 +552,7 @@ sub gen_package_mk() { $idx .= $suffix; my $depline; - next if $srcname eq $pkg_dep->{src}.$suffix; + next if $srcname eq $pkg_dep->{src}->{name}.$suffix; next if $dep{$condition.":".$srcname."->".$idx}; next if $dep{$srcname."->($dep)".$idx} and $pkg_dep->{vdepends}; my $depstr; From patchwork Mon Jan 8 14:52:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856837 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LW3uCx/g"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdjb6NLxz9ryT for ; Tue, 9 Jan 2018 02:00:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HDfjmwG1j+V1wmErDIdHyRvpTwSccCxzKdkKqMuo08A=; b=LW3uCx/g9FMXKC1wOkBgtAERJ0 NWsx3H5HI26GQ5tqk7vLVcvl+KFqHCzBVc55KJn/h7R4l40iDIdACc3nLb/HXqBE+odIjQdTgmp+N KlwdDZNeJk+s0e+ty5W+K2uV9Y7xGBV7XHgjeiCMVycpQSErWJ1QhmQFpgA3wPKdcmRoawxQWuo3e /rsC6aMpukCRcMq3MSZNoglLpgLBTp2u1T/ZwCSdttb/cJ8ai8jR2KfvU21dldiGAUUJCSGH7yLYu C5D5Un6y7EVJkSvPgZIr9KUrlSQqud5dly1z5WcM996XZMd+qf3z8SUp+FbktxOLuBPK9Mm0nOcIe 7RJ6RocQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYu7-0003A3-P9; Mon, 08 Jan 2018 14:59:59 +0000 Received: from orthanc.universe-factory.net ([104.238.176.138]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtX-0002l3-K3 for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 14:59:32 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id D6FC42047D; Mon, 8 Jan 2018 15:52:46 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:20 +0100 Message-Id: <84af005afc6dea3a5d6d787549b22a5c01eace6a.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065924_545906_D56F9A81 X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 07/15] metadata: replace %subdir hash with a path field in source packages X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Every single reference to subdir was concatenated with the source package name, so it makes sense to store the concatenated value instead. Signed-off-by: Matthias Schiffer --- scripts/metadata.pm | 12 +++--------- scripts/package-metadata.pl | 25 ++++++++++++------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/scripts/metadata.pm b/scripts/metadata.pm index 0577390eda..e636a45a33 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -2,13 +2,12 @@ package metadata; use base 'Exporter'; use strict; use warnings; -our @EXPORT = qw(%package %srcpackage %category %subdir %preconfig %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); +our @EXPORT = qw(%package %srcpackage %category %preconfig %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); our %package; our %preconfig; our %srcpackage; our %category; -our %subdir; our %features; our %overrides; our @ignore; @@ -178,7 +177,6 @@ sub parse_target_metadata($) { } sub clear_packages() { - %subdir = (); %preconfig = (); %package = (); %srcpackage = (); @@ -204,12 +202,10 @@ sub parse_package_metadata($) { }; while () { chomp; - /^Source-Makefile: \s*(package\/((?:.+\/)?)([^\/]+)\/Makefile)\s*$/ and do { - $subdir{$3} = $2; - + /^Source-Makefile: \s*(package\/((?:.+\/)?([^\/]+))\/Makefile)\s*$/ and do { $src = { makefile => $1, - subdir => $2, + path => $2, name => $3, ignore => $ignore{$3}, packages => [], @@ -235,7 +231,6 @@ sub parse_package_metadata($) { $pkg->{title} = ""; $pkg->{depends} = []; $pkg->{mdepends} = []; - $pkg->{subdir} = $src->{subdir}; $pkg->{tristate} = 1; $pkg->{override} = $override; $package{$1} = $pkg; @@ -278,7 +273,6 @@ sub parse_package_metadata($) { name => $vpkg, vdepends => [], src => $src, - subdir => $src->{subdir}, makefile => $src->{makefile}, }; push @{$package{$vpkg}->{vdepends}}, $pkg->{name}; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 2369c37e2b..c98db46d36 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -419,7 +419,6 @@ sub gen_package_mk() { parse_package_metadata($ARGV[0]) or exit 1; foreach my $srcname (sort {uc($a) cmp uc($b)} keys %srcpackage) { my $src = $srcpackage{$srcname}; - my $path = $subdir{$srcname}.$srcname; my $variant_default; my @srcdeps; @@ -429,30 +428,30 @@ sub gen_package_mk() { my $config = ''; $config = "\$(CONFIG_PACKAGE_$pkg->{name})" unless $pkg->{buildonly}; - $pkg->{prereq} and print "prereq-$config += $path\n"; + $pkg->{prereq} and print "prereq-$config += $src->{path}\n"; next if $pkg->{buildonly}; - print "package-$config += $path\n"; + print "package-$config += $src->{path}\n"; if ($pkg->{variant}) { if (!defined($variant_default) or $pkg->{variant_default}) { $variant_default = $pkg->{variant}; } - print "\$(curdir)/$path/variants += \$(if $config,$pkg->{variant})\n"; + print "\$(curdir)/$src->{path}/variants += \$(if $config,$pkg->{variant})\n"; } } if (defined($variant_default)) { - print "\$(curdir)/$path/default-variant := $variant_default\n"; + print "\$(curdir)/$src->{path}/default-variant := $variant_default\n"; } unless (grep {!$_->{buildonly}} @{$src->{packages}}) { - print "package- += $path\n"; + print "package- += $src->{path}\n"; } if (@{$src->{buildtypes}} > 0) { - print "buildtypes-$path = ".join(' ', @{$src->{buildtypes}})."\n"; + print "buildtypes-$src->{path} = ".join(' ', @{$src->{buildtypes}})."\n"; } foreach my $dep (@{$src->{builddepends}}, map { @{$_->{depends}} } @{$src->{packages}}) { @@ -489,9 +488,9 @@ sub gen_package_mk() { $src->{makefile}, $type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{makefile}, $deptype; next; } - $idx = $pkg_dep->{subdir}.$pkg_dep->{src}->{name}; + $idx = $pkg_dep->{src}->{path}; } elsif (defined($srcpackage{$dep})) { - $idx = $subdir{$dep}.$dep; + $idx = $srcpackage{$dep}->{path}; } else { next; } @@ -503,7 +502,7 @@ sub gen_package_mk() { } my $depline = join(" ", sort keys %deplines); if ($depline) { - $line .= "\$(curdir)/$path/$type/compile += $depline\n"; + $line .= "\$(curdir)/$src->{path}/$type/compile += $depline\n"; } } @@ -543,9 +542,9 @@ sub gen_package_mk() { $src->{makefile}, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{makefile}, $deptype; next; } - $idx = $pkg_dep->{subdir}.$pkg_dep->{src}->{name}; + $idx = $pkg_dep->{src}->{path}; } elsif (defined($srcpackage{$dep})) { - $idx = $subdir{$dep}.$dep; + $idx = $srcpackage{$dep}->{path}; } if ($idx) { @@ -573,7 +572,7 @@ sub gen_package_mk() { } my $depline = join(" ", sort keys %deplines); if ($depline) { - $line .= "\$(curdir)/$path/compile += $depline\n"; + $line .= "\$(curdir)/$src->{path}/compile += $depline\n"; } } From patchwork Mon Jan 8 14:52:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856836 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q7bgMsks"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdjS15mPz9ryT for ; Tue, 9 Jan 2018 01:59:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=nhcWvTdyrYHgAOZjhDbNoAILI5H0xbZtBnS0Tc1Qukg=; b=q7bgMsks9GFfvm1wbfbwtvjoZy 3+7TbK/G19e4MIJMefH/YC9uDa57TretCZU9KYbgiZDg2u/hxJsinqbuRVNzY9126n+Wqw4GA4LPL bR8HlWRY9xEe+ZVtIfSY4hXIcX8gd7Wr7AzZncHgokDfXChZ7l1JxYONGPLm0H2smagfEAUZG9YBS iJfSb4qiZi6327zft0UdhujZCZbJ54MsNFf1ZJt0WI15wPbDCP5rjkrDWju9EvNs4QY1VwR/MqGmm QunsxPNXLppTkWpRfSz7Zf2+YKLmI7c7JnnouTu3fyFeVsp+b5eZClGwLnNQvXnxrNlcyvLXnbUSN gyD/9LIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtl-0002xH-Mt; Mon, 08 Jan 2018 14:59:37 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtX-0002l5-MC for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 14:59:32 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 1044C20480; Mon, 8 Jan 2018 15:52:47 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:21 +0100 Message-Id: X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065924_488175_4DFAFF63 X-CRM114-Status: UNSURE ( 7.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 08/15] metadata: remove redundant fields from package hash X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Matthias Schiffer --- scripts/metadata.pm | 3 --- scripts/package-metadata.pl | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/metadata.pm b/scripts/metadata.pm index e636a45a33..50f91407d6 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -224,9 +224,7 @@ sub parse_package_metadata($) { /^Package:\s*(.+?)\s*$/ and do { undef $feature; $pkg = {}; - $pkg->{ignore} = $src->{ignore}; $pkg->{src} = $src; - $pkg->{makefile} = $src->{makefile}; $pkg->{name} = $1; $pkg->{title} = ""; $pkg->{depends} = []; @@ -273,7 +271,6 @@ sub parse_package_metadata($) { name => $vpkg, vdepends => [], src => $src, - makefile => $src->{makefile}, }; push @{$package{$vpkg}->{vdepends}}, $pkg->{name}; } diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index c98db46d36..233fb0eabf 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -290,7 +290,7 @@ sub print_package_config_category($) { print "menu \"$menu\"\n"; } foreach my $pkg (@pkgs) { - next if $pkg->{ignore}; + next if $pkg->{src}->{ignore}; my $title = $pkg->{name}; my $c = (72 - length($pkg->{name}) - length($pkg->{title})); if ($c > 0) { @@ -485,7 +485,7 @@ sub gen_package_mk() { if (defined($pkg_dep) && defined($pkg_dep->{src})) { unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}->{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $src->{makefile}, $type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{makefile}, $deptype; + $src->{makefile}, $type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype; next; } $idx = $pkg_dep->{src}->{path}; @@ -539,7 +539,7 @@ sub gen_package_mk() { if (defined $pkg_dep->{src}) { unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}->{buildtypes}}) { warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $src->{makefile}, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{makefile}, $deptype; + $src->{makefile}, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype; next; } $idx = $pkg_dep->{src}->{path}; @@ -640,7 +640,7 @@ sub gen_package_license($) { } else { if ($level == 1) { print "$pkg->{name}: Missing license! "; - print "Please fix $pkg->{makefile}\n"; + print "Please fix $pkg->{src}->{makefile}\n"; } } } From patchwork Mon Jan 8 14:52:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856852 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OWoxpS5q"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdqV1965z9s7f for ; Tue, 9 Jan 2018 02:05:10 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Vr31XOJKBqUu/bcLe6+7LmTlvQU9qWgNfGO/qVYMOCc=; b=OWoxpS5qVOldhThXtS8QSHcHh3 oM762RCr+GWOfhIMRr1IMmVH/uzbXD/xkLlHeO1WP0fsXW3xfSQJrChOldx7FC2fcx1nsgvyE7OLV RKzLVRsjLyopq5BGTHJsHp8eouTI/igeJ7pg5/K2v1nKMew8Er/xnJ3u3/Zhvv13Be8L/1w2nR/Fp Y0xqfi9EPSc/4RDiBpEvn/FWmvpbO8FC9NDcXNj/7UVQO+AOYD6dmN30rt7AedrlZAs+2yXEjNLpR hCCxsyxl10tPZjwixpCOI9qCytYDeqkXL1mio7xBhPksLcCPUZnCPX+ldiw2P953tG3LR3KTaieRy ysLTFlqw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYyv-0007lD-PO; Mon, 08 Jan 2018 15:04:57 +0000 Received: from orthanc.universe-factory.net ([104.238.176.138]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002yP-No for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:50 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 40B1F20492; Mon, 8 Jan 2018 15:52:47 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:22 +0100 Message-Id: <9d04b622ea42433df5de48e0064a5397a2efbf12.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065945_054313_BA39C8FE X-CRM114-Status: UNSURE ( 7.61 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 09/15] build: remove package preconfig feature X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This feature has been unused for years, and its scope is too limited to be actually useful. Signed-off-by: Matthias Schiffer --- include/package-dumpinfo.mk | 16 +--------------- package/Makefile | 3 --- scripts/metadata.pm | 20 +------------------- scripts/package-metadata.pl | 36 ------------------------------------ 4 files changed, 2 insertions(+), 73 deletions(-) diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index 1be7d958d4..7cc8f3f6dc 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -9,19 +9,6 @@ ifneq ($(DUMP),) dumpinfo: FORCE -define Config/template -Preconfig: $(1) -Preconfig-Type: $(2) -Preconfig-Default: $(3) -Preconfig-Label: $(4) - -endef - -define Config - Preconfig/$(1) = $$(call Config/template,$(1),$(2),$(3),$(4)) - preconfig_$$(1) += $(1) -endef - define Dumpinfo/Package $(info Package: $(1) $(if $(MENU),Menu: $(MENU) @@ -59,8 +46,7 @@ $(if $(URL),$(URL) $(if $(Package/$(1)/config),Config: $(Package/$(1)/config) @@ -)$(foreach pc,$(preconfig_$(1)), -$(Preconfig/$(pc)))) +)) endef define Feature/Default diff --git a/package/Makefile b/package/Makefile index 4fdf415046..0aefbb8023 100644 --- a/package/Makefile +++ b/package/Makefile @@ -72,7 +72,6 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE $(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \ done; \ done || true - @-$(MAKE) package/preconfig $(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG) @@ -96,8 +95,6 @@ ifdef CONFIG_SIGNED_PACKAGES ); done endif -$(curdir)/preconfig: - $(curdir)/flags-install:= -j1 $(eval $(call stampfile,$(curdir),package,prereq,.config)) diff --git a/scripts/metadata.pm b/scripts/metadata.pm index 50f91407d6..bb3fa72403 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -2,10 +2,9 @@ package metadata; use base 'Exporter'; use strict; use warnings; -our @EXPORT = qw(%package %srcpackage %category %preconfig %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); +our @EXPORT = qw(%package %srcpackage %category %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); our %package; -our %preconfig; our %srcpackage; our %category; our %features; @@ -177,7 +176,6 @@ sub parse_target_metadata($) { } sub clear_packages() { - %preconfig = (); %package = (); %srcpackage = (); %category = (); @@ -191,7 +189,6 @@ sub parse_package_metadata($) { my $file = shift; my $pkg; my $feature; - my $preconfig; my $src; my $override; my %ignore = map { $_ => 1 } @ignore; @@ -299,21 +296,6 @@ sub parse_package_metadata($) { }; /^Config:\s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE, "\t"); /^Prereq-Check:/ and $pkg->{prereq} = 1; - /^Preconfig:\s*(.+)\s*$/ and do { - my $pkgname = $pkg->{name}; - $preconfig{$pkgname} or $preconfig{$pkgname} = {}; - if (exists $preconfig{$pkgname}->{$1}) { - $preconfig = $preconfig{$pkgname}->{$1}; - } else { - $preconfig = { - id => $1 - }; - $preconfig{$pkgname}->{$1} = $preconfig unless $src->{ignore}; - } - }; - /^Preconfig-Type:\s*(.*?)\s*$/ and $preconfig->{type} = $1; - /^Preconfig-Label:\s*(.*?)\s*$/ and $preconfig->{label} = $1; - /^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = $1; /^Require-User:\s*(.*?)\s*$/ and do { my @ugspecs = split /\s+/, $1; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 233fb0eabf..9372191166 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -372,19 +372,6 @@ sub print_package_overrides() { sub gen_package_config() { parse_package_metadata($ARGV[0]) or exit 1; print "menuconfig IMAGEOPT\n\tbool \"Image configuration\"\n\tdefault n\n"; - foreach my $preconfig (keys %preconfig) { - foreach my $cfg (keys %{$preconfig{$preconfig}}) { - my $conf = $preconfig{$preconfig}->{$cfg}->{id}; - $conf =~ tr/\.-/__/; - print <{$cfg}->{label}" if IMAGEOPT - depends on PACKAGE_$preconfig - default "$preconfig{$preconfig}->{$cfg}->{default}" - -EOF - } - } print "source \"package/*/image-config.in\"\n"; if (scalar glob "package/feeds/*/*/image-config.in") { print "source \"package/feeds/*/*/image-config.in\"\n"; @@ -579,29 +566,6 @@ sub gen_package_mk() { if ($line ne "") { print "\n$line"; } - foreach my $preconfig (keys %preconfig) { - my $cmds; - foreach my $cfg (keys %{$preconfig{$preconfig}}) { - my $conf = $preconfig{$preconfig}->{$cfg}->{id}; - $conf =~ tr/\.-/__/; - $cmds .= "\techo \"uci set '$preconfig{$preconfig}->{$cfg}->{id}=\$(subst \",,\$(CONFIG_UCI_PRECONFIG_$conf))'\"; \\\n"; - } - next unless $cmds; - print < \$@ - -ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),) - package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig -endif -endif - -EOF - } } sub gen_package_source() { From patchwork Mon Jan 8 14:52:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856845 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Obg6k6Aq"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdnX11Pdz9s4s for ; Tue, 9 Jan 2018 02:03:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KjoA4CFbXV9u/MGewdKKnvi5ihsRkeCkvusqX7vdBfI=; b=Obg6k6AqEl8moEbkE9IIeIjY3X 0D2aOlahbC+VfE3T/U6XMfQqainDojfeZgfIelF9I7lEPc/lcnjZ1iL6IKY6fBd+0YHIhF9o64Ir2 7qpCiWvqFY5WuAJdQoW/bTAWSaXW1Nh6XmxpnUD7wBJGdn98wbGJc1DQb0sAxAWQjCpy8gjxfMfIJ VK2J1xwz05lkX4NuQr9V0caSrd3dOAFmY1bV6VMYqxh5wfadN9TslSEMDiqDk2DtZhJ/EWOgJb+dj nrgW8YAthnfOWfV+wSnP87y+659VeAImGHGpEYcsbuFQ4TwNHCvEM55uvivdCHgCcFh8FOnY3vjvl 1tsTLFyA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYxF-0006EU-TU; Mon, 08 Jan 2018 15:03:14 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002vt-MR for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:31 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 6F02D2049E; Mon, 8 Jan 2018 15:52:47 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:23 +0100 Message-Id: <5fca97c979a72cc8b5b72574cb0f108459fb72a0.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065944_617584_0C340B77 X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 10/15] treewide: fix build depends to refer to source package names X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Build depends must refer to source packages rather than binary package names. Signed-off-by: Matthias Schiffer --- include/autotools.mk | 4 ++-- include/nls.mk | 2 +- package/network/config/ltq-adsl-app/Makefile | 2 +- package/network/config/ltq-vdsl-app/Makefile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/autotools.mk b/include/autotools.mk index 7bd400ab36..aa044aa0b4 100644 --- a/include/autotools.mk +++ b/include/autotools.mk @@ -105,14 +105,14 @@ ifneq ($(filter patch-libtool,$(PKG_FIXUP)),) endif ifneq ($(filter libtool,$(PKG_FIXUP)),) - PKG_BUILD_DEPENDS += libtool libintl libiconv + PKG_BUILD_DEPENDS += libtool gettext libiconv ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),) Hooks/Configure/Pre += autoreconf_target endif endif ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),) - PKG_BUILD_DEPENDS += libtool libintl libiconv + PKG_BUILD_DEPENDS += libtool gettext libiconv ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),) Hooks/Configure/Pre += autoreconf_target endif diff --git a/include/nls.mk b/include/nls.mk index 51463b9f12..04838821b4 100644 --- a/include/nls.mk +++ b/include/nls.mk @@ -23,7 +23,7 @@ else endif PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS -PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:libintl +PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:gettext ICONV_DEPENDS:=+BUILD_NLS:libiconv-full ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile index cf8eaf247d..153cf9a26c 100644 --- a/package/network/config/ltq-adsl-app/Makefile +++ b/package/network/config/ltq-adsl-app/Makefile @@ -24,7 +24,7 @@ PKG_CONFIG_DEPENDS:=\ CONFIG_LTQ_DSL_ENABLE_SOAP \ CONFIG_LTQ_DSL_ENABLE_DSL_EVENT_POLLING -PKG_BUILD_DEPENDS:=TARGET_lantiq_xway:kmod-ltq-adsl-danube TARGET_lantiq_xway_legacy:kmod-ltq-adsl-danube TARGET_lantiq_ase:kmod-ltq-adsl-ase +PKG_BUILD_DEPENDS:=ltq-adsl PKG_FLAGS:=nonshared diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index baf63f9d13..71842ce345 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -17,7 +17,7 @@ PKG_HASH:=da8bb929526a61aea0e153ef524331fcd472a1ebbc6d88ca017735a4f82ece02 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION) PKG_LICENSE:=BSD-2-Clause -PKG_BUILD_DEPENDS:=kmod-ltq-vdsl-vr9 +PKG_BUILD_DEPENDS:=ltq-vdsl PKG_FLAGS:=nonshared From patchwork Mon Jan 8 14:52:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856848 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RXlk7IIZ"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdpZ6dVHz9s7f for ; Tue, 9 Jan 2018 02:04:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0tJhc7d6ns+xels86JW3ZFahXc4JRdpCwqQCoN6XQxo=; b=RXlk7IIZdvf4iJUA+VpQNreFsG 5D93Wv5wO2PF8nfUmXfAJVqjHlXMUg54HDveC6B+HAaIcj2ZJCYLDXOw9mHovfxqeC5mLb0ZLvevj R35Ce1ViZv0xPKGk9KZyDg54Acwp72ufoUEQWKRu1KVXL+dj6OCKjFLL5H2B60nWFTghXNUqvseMn KeY9uQIey2QOAzkd8qiSoxRDVFTmNjeUP8DETSmzb1b8RsEysvMPkqL/hHBlVD9ebgpjxQIol0iTw /MtGjho5lgfcf2YTXEEDuKha1bFVC2Dk1smI1w53Tab3hEZlbRYb3/xACLDgJmqXQc/7i5Rh3rdKr ynttoXHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYyA-00078d-Rn; Mon, 08 Jan 2018 15:04:10 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002yI-NO for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:43 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 9E58C2049F; Mon, 8 Jan 2018 15:52:47 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:24 +0100 Message-Id: X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065944_957050_72D4FB87 X-CRM114-Status: GOOD ( 11.93 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 11/15] metadata: handle target build depends together with host build depends X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Target build depends are similar to host build depends in that they refer to source packages rather than binary packages. Therefore, it makes sense to handle them together, rather than putting them in a list together with runtime depends and trying to figure out if the entries refer to source or to binary packages afterwards. This does lead to PKG_BUILD_DEPENDS entries referring to binary package names not working anymore, which requires some fixes in the package repositories. Signed-off-by: Matthias Schiffer --- scripts/package-metadata.pl | 60 +++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 9372191166..e492cc8a09 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -408,6 +408,7 @@ sub gen_package_mk() { my $src = $srcpackage{$srcname}; my $variant_default; my @srcdeps; + my %deplines = ('' => {}); foreach my $pkg (@{$src->{packages}}) { next if defined $pkg->{vdepends}; @@ -441,19 +442,23 @@ sub gen_package_mk() { print "buildtypes-$src->{path} = ".join(' ', @{$src->{buildtypes}})."\n"; } - foreach my $dep (@{$src->{builddepends}}, map { @{$_->{depends}} } @{$src->{packages}}) { + foreach my $dep (map { @{$_->{depends}} } @{$src->{packages}}) { $dep =~ /@/ or do { $dep =~ s/\+//g; push @srcdeps, $dep; }; } - foreach my $type (@{$src->{buildtypes}}) { - my @extra_deps; - my %deplines; + foreach my $type ('', @{$src->{buildtypes}}) { + my $suffix = ''; - next unless $src->{"builddepends/$type"}; - foreach my $dep (@{$src->{"builddepends/$type"}}) { - my $suffix = ""; + $suffix = "/$type" if $type; + + next unless $src->{"builddepends$suffix"}; + + defined $deplines{$suffix} or $deplines{$suffix} = {}; + + foreach my $dep (@{$src->{"builddepends$suffix"}}) { + my $depsuffix = ""; my $deptype = ""; my $condition; @@ -464,37 +469,26 @@ sub gen_package_mk() { if ($dep =~ /^(.+)\/(.+)/) { $dep = $1; $deptype = $2; - $suffix = "/$2"; + $depsuffix = "/$2"; } - my $idx = ""; - my $pkg_dep = $package{$dep}; - if (defined($pkg_dep) && defined($pkg_dep->{src})) { - unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}->{buildtypes}}) { - warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $src->{makefile}, $type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype; - next; - } - $idx = $pkg_dep->{src}->{path}; - } elsif (defined($srcpackage{$dep})) { - $idx = $srcpackage{$dep}->{path}; - } else { + next if $srcname.$suffix eq $dep.$depsuffix; + + my $src_dep = $srcpackage{$dep}; + unless (defined($src_dep) && (!$deptype || grep { $_ eq $deptype } @{$src_dep->{buildtypes}})) { + warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s%s', which does not exist\n", + $src->{makefile}, $dep, $depsuffix; next; } - my $depstr = "\$(curdir)/$idx$suffix/compile"; + + my $depstr = "\$(curdir)/$src_dep->{path}$depsuffix/compile"; my $depline = get_conditional_dep($condition, $depstr); if ($depline) { - $deplines{$depline}++; + $deplines{$suffix}->{$depline}++; } } - my $depline = join(" ", sort keys %deplines); - if ($depline) { - $line .= "\$(curdir)/$src->{path}/$type/compile += $depline\n"; - } } - my $hasdeps = 0; - my %deplines; foreach my $deps (@srcdeps) { my $idx; my $condition; @@ -552,14 +546,16 @@ sub gen_package_mk() { } $depline = get_conditional_dep($condition, $depstr); if ($depline) { - $deplines{$depline}++; + $deplines{''}->{$depline}++; } } } } - my $depline = join(" ", sort keys %deplines); - if ($depline) { - $line .= "\$(curdir)/$src->{path}/compile += $depline\n"; + foreach my $suffix (sort keys %deplines) { + my $depline = join(" ", sort keys %{$deplines{$suffix}}); + if ($depline) { + $line .= "\$(curdir)/$src->{path}$suffix/compile += $depline\n"; + } } } From patchwork Mon Jan 8 14:52:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856846 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GTy+DCwF"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdnx69KXz9s4s for ; Tue, 9 Jan 2018 02:03:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KXjy0yl0dWxC+eorTY+pVcZ9BvAeS9ZEiLQYNp7N02k=; b=GTy+DCwFz4ctMbxUULL9AHg6By EeKJfLVcxs4ptL7d8P648mW/0JcAA+kCMmeYgPV9/a2LrkrSEtA5MOXDrWVgc/OY0hvZ9vHMpq2DO DzNJV0+zREOWwjULsNfR1m016/s34VQ42aneXugLKoxTiJmK8bOqZghkVUgcrCbBLSQAMZytMsU6t xJ/174B91OSq55MnG4/H0JtPenALXcpsLti/daxynptoNHuE8ABA8spdvP2veyeUigXK/aIF7DzXI 2ivUoOQB3hRhWesEBtc5Pp64djSElglPJpaKP4Oi87gKG4UfUUT2uFr1ZlC9n7c46adH54zyH2kON eTMZOj3Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYxj-0006jx-1E; Mon, 08 Jan 2018 15:03:43 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002xo-MF for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:36 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id CCE04204A1; Mon, 8 Jan 2018 15:52:47 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:25 +0100 Message-Id: X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065944_846451_30B8D901 X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 12/15] metadata: simplify generation of build depends from runtime depends X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Runtime depends cannot have a buildtype suffix, and they never refer to source package names. In addition, this adds warnings about unsatisfiable dependencies. Furthermore, this change fixes the generation of conditional build dependencies for virtual packages provided by different source packages. Signed-off-by: Matthias Schiffer --- scripts/package-metadata.pl | 112 ++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 71 deletions(-) diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index e492cc8a09..980ad24dc0 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -399,18 +399,56 @@ sub get_conditional_dep($$) { } sub gen_package_mk() { - my %conf; - my %dep; my $line; parse_package_metadata($ARGV[0]) or exit 1; foreach my $srcname (sort {uc($a) cmp uc($b)} keys %srcpackage) { my $src = $srcpackage{$srcname}; my $variant_default; - my @srcdeps; my %deplines = ('' => {}); foreach my $pkg (@{$src->{packages}}) { + foreach my $dep (@{$pkg->{depends}}) { + next if ($dep =~ /@/); + + my $condition; + + $dep =~ s/\+//g; + if ($dep =~ /^(.+):(.+)/) { + $condition = $1; + $dep = $2; + } + + my $pkg_dep = $package{$dep}; + unless (defined $pkg_dep) { + warn sprintf "WARNING: Makefile '%s' has a dependency on '%s', which does not exist\n", + $src->{makefile}, $dep; + next; + } + + unless ($pkg_dep->{vdepends}) { + next if $srcname eq $pkg_dep->{src}->{name}; + + my $depstr = "\$(curdir)/$pkg_dep->{src}->{path}/compile"; + my $depline = get_conditional_dep($condition, $depstr); + if ($depline) { + $deplines{''}->{$depline}++; + } + next; + } + + foreach my $vdep (@{$pkg_dep->{vdepends}}) { + my $pkg_vdep = $package{$vdep}; + next if $srcname eq $pkg_vdep->{src}->{name}; + + my $depstr = "\$(if \$(CONFIG_PACKAGE_$vdep),\$(curdir)/$pkg_vdep->{src}->{path}/compile)"; + my $depline = get_conditional_dep($condition, $depstr); + if ($depline) { + $deplines{''}->{$depline}++; + } + } + } + next if defined $pkg->{vdepends}; my $config = ''; @@ -442,12 +480,6 @@ sub gen_package_mk() { print "buildtypes-$src->{path} = ".join(' ', @{$src->{buildtypes}})."\n"; } - foreach my $dep (map { @{$_->{depends}} } @{$src->{packages}}) { - $dep =~ /@/ or do { - $dep =~ s/\+//g; - push @srcdeps, $dep; - }; - } foreach my $type ('', @{$src->{buildtypes}}) { my $suffix = ''; @@ -489,68 +521,6 @@ sub gen_package_mk() { } } - foreach my $deps (@srcdeps) { - my $idx; - my $condition; - my $prefix = ""; - my $suffix = ""; - my $deptype = ""; - - if ($deps =~ /^(.+):(.+)/) { - $condition = $1; - $deps = $2; - } - if ($deps =~ /^(.+)\/(.+)/) { - $deps = $1; - $deptype = $2; - $suffix = "/$2"; - } - - my $pkg_dep = $package{$deps}; - my @deps; - - if ($pkg_dep->{vdepends}) { - @deps = @{$pkg_dep->{vdepends}}; - } else { - @deps = ($deps); - } - - foreach my $dep (@deps) { - $pkg_dep = $package{$deps}; - if (defined $pkg_dep->{src}) { - unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{src}->{buildtypes}}) { - warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n", - $src->{makefile}, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype; - next; - } - $idx = $pkg_dep->{src}->{path}; - } elsif (defined($srcpackage{$dep})) { - $idx = $srcpackage{$dep}->{path}; - } - - if ($idx) { - $idx .= $suffix; - - my $depline; - next if $srcname eq $pkg_dep->{src}->{name}.$suffix; - next if $dep{$condition.":".$srcname."->".$idx}; - next if $dep{$srcname."->($dep)".$idx} and $pkg_dep->{vdepends}; - my $depstr; - - if ($pkg_dep->{vdepends}) { - $depstr = "\$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx/compile)"; - $dep{$srcname."->($dep)".$idx} = 1; - } else { - $depstr = "\$(curdir)/$idx/compile"; - $dep{$srcname."->".$idx} = 1; - } - $depline = get_conditional_dep($condition, $depstr); - if ($depline) { - $deplines{''}->{$depline}++; - } - } - } - } foreach my $suffix (sort keys %deplines) { my $depline = join(" ", sort keys %{$deplines{$suffix}}); if ($depline) { From patchwork Mon Jan 8 14:52:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856853 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="avfY4Ks9"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdqz0s0Tz9s4s for ; Tue, 9 Jan 2018 02:05:35 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ZVzJ7MWkSWFlPYDtBQlCgyERKcZ5DL6w23Q1MkctaHk=; b=avfY4Ks9sDxW+w+zCEJaCnmDDC MF98d/OA9jSpz/Y8QguDGLldZVaEQVBpjdUafUot67MrCImxSq7b26YmrGcqOFxrGvQNu9SZQv6+t b/I7rvW0IjDV/myYzI3POtIz4BVTGVtXOJBRUgZQvrpxBxjZ4dXt6s2Clryjore45OykADEmmubZK 7ygoKaGZ/cj4BOTMqLC9ZkbAAZ0wctJ3VvLUztg4gO4MgaSOBaCGCkPmHm4KWthc+UmebOmXwIkKt EdFA/7YrB7JthGLbf4L+b7ruISe1f9Kuq/3YHQ0XiQjQwqanQYcaAJ+EuMkgDgiKngNKnt/JkpjJI OaSJT+Dw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYzL-0008DU-3Q; Mon, 08 Jan 2018 15:05:23 +0000 Received: from orthanc.universe-factory.net ([104.238.176.138]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002yJ-O4 for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:54 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 090ED204A3; Mon, 8 Jan 2018 15:52:48 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:26 +0100 Message-Id: <575ae0aa149ab00eb714fb6c4f238767e3222848.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065945_009923_2DC29915 X-CRM114-Status: GOOD ( 11.33 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 13/15] metadata: always resolve dependencies through provides list X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Instead of adding virtual packages to the normal package list, keep a separate list for provides, make each package provide itself, and resolve all dependencies through this list. This allows to use PROVIDES to replace existing packages. Fixes FS#837. Signed-off-by: Matthias Schiffer --- scripts/feeds | 4 +-- scripts/metadata.pm | 15 ++++++------ scripts/package-metadata.pl | 60 +++++++++++++++++++-------------------------- 3 files changed, 34 insertions(+), 45 deletions(-) diff --git a/scripts/feeds b/scripts/feeds index b531fbac62..626edc6665 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -252,7 +252,6 @@ sub search_feed { my $substr; my $pkgmatch = 1; - next if $pkg->{vdepends}; foreach my $substr (@substr) { my $match; foreach my $key (qw(name title description src)) { @@ -306,7 +305,6 @@ sub list_feed { get_feed($feed); foreach my $name (sort { lc($a) cmp lc($b) } keys %$feed_package) { my $pkg = $feed_package->{$name}; - next if $pkg->{vdepends}; if($pkg->{name}) { printf "\%-32s\t\%s\n", $pkg->{name}, $pkg->{title}; } @@ -530,6 +528,7 @@ sub install_package { @{$feed_src->{$src}->{"builddepends/host"}}, map { @{$_->{depends}} } @{$feed_src->{$src}->{packages}} ) { + # TODO: handle virtual packages and PROVIDES next if $dep =~ /@/; $dep =~ s/^\+//; $dep =~ s/^.+://; @@ -590,7 +589,6 @@ sub install { get_feed($f->[1]); foreach my $name (sort { lc($a) cmp lc($b) } keys %$feed_package) { my $p = $feed_package->{$name}; - next if $p->{vdepends}; if( $p->{name} ) { install_package($feed, $p->{name}, exists($opts{f})) == 0 or $ret = 1; get_feed($f->[1]); diff --git a/scripts/metadata.pm b/scripts/metadata.pm index bb3fa72403..bf93271749 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -2,9 +2,10 @@ package metadata; use base 'Exporter'; use strict; use warnings; -our @EXPORT = qw(%package %srcpackage %category %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); +our @EXPORT = qw(%package %vpackage %srcpackage %category %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); our %package; +our %vpackage; our %srcpackage; our %category; our %features; @@ -177,6 +178,7 @@ sub parse_target_metadata($) { sub clear_packages() { %package = (); + %vpackage = (); %srcpackage = (); %category = (); %features = (); @@ -230,6 +232,9 @@ sub parse_package_metadata($) { $pkg->{override} = $override; $package{$1} = $pkg; push @{$src->{packages}}, $pkg; + + $vpackage{$1} or $vpackage{$1} = []; + unshift @{$vpackage{$1}}, $pkg; }; /^Feature:\s*(.+?)\s*$/ and do { undef $pkg; @@ -264,12 +269,8 @@ sub parse_package_metadata($) { /^Provides: \s*(.+)\s*$/ and do { my @vpkg = split /\s+/, $1; foreach my $vpkg (@vpkg) { - $package{$vpkg} or $package{$vpkg} = { - name => $vpkg, - vdepends => [], - src => $src, - }; - push @{$package{$vpkg}->{vdepends}}, $pkg->{name}; + $vpackage{$vpkg} or $vpackage{$vpkg} = []; + push @{$vpackage{$vpkg}}, $pkg; } }; /^Menu-Depends: \s*(.+)\s*$/ and $pkg->{mdepends} = [ split /\s+/, $1 ]; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 980ad24dc0..41e7108322 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -101,14 +101,16 @@ my %dep_check; sub __find_package_dep($$) { my $pkg = shift; my $name = shift; - my $deps = ($pkg->{vdepends} or $pkg->{depends}); + my $deps = $pkg->{depends}; return 0 unless defined $deps; - foreach my $dep (@{$deps}) { - next if $dep_check{$dep}; - $dep_check{$dep} = 1; - return 1 if $dep eq $name; - return 1 if ($package{$dep} and (__find_package_dep($package{$dep},$name) == 1)); + foreach my $vpkg (@{$deps}) { + foreach my $dep (@{$vpackage{$vpkg}}) { + next if $dep_check{$dep->{name}}; + $dep_check{$dep->{name}} = 1; + return 1 if $dep->{name} eq $name; + return 1 if (__find_package_dep($dep, $name) == 1); + } } return 0; } @@ -156,7 +158,6 @@ sub mconf_depends { my $m = "depends on"; my $flags = ""; $depend =~ s/^([@\+]+)// and $flags = $1; - my $vdep; my $condition = $parent_condition; next if $condition eq $depend; @@ -173,23 +174,21 @@ sub mconf_depends { } $depend = $2; } - next if $package{$depend} and $package{$depend}->{buildonly}; if ($flags =~ /\+/) { - if ($vdep = $package{$depend}->{vdepends}) { + my $vdep = $vpackage{$depend}; + if ($vdep) { my @vdeps; - $depend = undef; foreach my $v (@$vdep) { - if ($package{$v} && $package{$v}->{variant_default}) { - $depend = $v; + next if $v->{buildonly}; + if ($v->{variant_default}) { + unshift @vdeps, $v->{name}; } else { - push @vdeps, $v; + push @vdeps, $v->{name}; } } - if (!$depend) { - $depend = shift @vdeps; - } + $depend = shift @vdeps; if (@vdeps > 1) { $condition = ($condition ? "$condition && " : '') . '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')'; @@ -209,7 +208,8 @@ sub mconf_depends { $flags =~ /@/ or $depend = "PACKAGE_$depend"; } else { - if ($vdep = $package{$depend}->{vdepends}) { + my $vdep = $vpackage{$depend}; + if ($vdep) { $depend = join("||", map { "PACKAGE_".$_ } @$vdep); } else { $flags =~ /@/ or $depend = "PACKAGE_$depend"; @@ -419,29 +419,21 @@ sub gen_package_mk() { $dep = $2; } - my $pkg_dep = $package{$dep}; - unless (defined $pkg_dep) { + my $vpkg_dep = $vpackage{$dep}; + unless (defined $vpkg_dep) { warn sprintf "WARNING: Makefile '%s' has a dependency on '%s', which does not exist\n", $src->{makefile}, $dep; next; } - unless ($pkg_dep->{vdepends}) { - next if $srcname eq $pkg_dep->{src}->{name}; + # Filter out self-depends + my @vdeps = grep { $srcname ne $_->{src}->{name} } @{$vpkg_dep}; - my $depstr = "\$(curdir)/$pkg_dep->{src}->{path}/compile"; - my $depline = get_conditional_dep($condition, $depstr); - if ($depline) { - $deplines{''}->{$depline}++; + foreach my $vdep (@vdeps) { + my $depstr = "\$(curdir)/$vdep->{src}->{path}/compile"; + if (@vdeps > 1) { + $depstr = "\$(if \$(CONFIG_PACKAGE_$vdep->{name}),$depstr)"; } - next; - } - - foreach my $vdep (@{$pkg_dep->{vdepends}}) { - my $pkg_vdep = $package{$vdep}; - next if $srcname eq $pkg_vdep->{src}->{name}; - - my $depstr = "\$(if \$(CONFIG_PACKAGE_$vdep),\$(curdir)/$pkg_vdep->{src}->{path}/compile)"; my $depline = get_conditional_dep($condition, $depstr); if ($depline) { $deplines{''}->{$depline}++; @@ -449,8 +441,6 @@ sub gen_package_mk() { } } - next if defined $pkg->{vdepends}; - my $config = ''; $config = "\$(CONFIG_PACKAGE_$pkg->{name})" unless $pkg->{buildonly}; From patchwork Mon Jan 8 14:52:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856850 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ntvM5euw"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdpv2t6Hz9s4s for ; Tue, 9 Jan 2018 02:04:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tIQR59WQEq5+jO5Ym8U1aRhAowBx+WN/+DHIMeS68Co=; b=ntvM5euwc3udeZ8T+RsdmX6+u+ oAIHr8BfJKOg19L4+nR6Y8zvEDEFCyZyp/bBeGi9B7oZFOF1Y3R6Kkoo2a8dJtofmlYjj71hkx+p9 zjf7QL2YwgMjtNybsy0CkkHUNgkui9QmwE67w8Vf/abQLgp8gEfjkhEerP0c9J1Uv/AZ5vYev+kOx yu9LxpZHs1+booznq+2xLEo3va0K4M54veVRHA15G5NrLTXPFpU2IzmkVgMy633eCPT801MjDuwEv IpAZExPI6djyGyowCWDraOvCAiK3BgRZioS+Scrk0l64UeV59UoiJ20r2+2hzg9p0EN9yIJJJxTEz lak0Wsbw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYyY-0007Rz-GO; Mon, 08 Jan 2018 15:04:34 +0000 Received: from orthanc.universe-factory.net ([2001:19f0:6c01:100::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002vZ-NQ for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:47 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 376D3204A4; Mon, 8 Jan 2018 15:52:48 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:27 +0100 Message-Id: <763d2f7bf22cf8d223a04c647b17f492716512de.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065945_099883_96CC05D8 X-CRM114-Status: UNSURE ( 7.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 14/15] build: remove obsolete "package feature" feature X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Package "features" seem to be unused for some time. In any case, custom Config.in snippets and package PROVIDES are a much more flexible way to express similar options. Signed-off-by: Matthias Schiffer --- include/package-dumpinfo.mk | 25 ------------------------- scripts/metadata.pm | 23 +---------------------- scripts/package-metadata.pl | 26 -------------------------- 3 files changed, 1 insertion(+), 73 deletions(-) diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index 7cc8f3f6dc..68a66d0769 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -49,29 +49,4 @@ $(Package/$(1)/config) )) endef -define Feature/Default - TARGET_NAME:= - TARGET_TITLE:= - PRIORITY:= - NAME:= -endef - -define Feature - $(eval $(Feature/Default)) - $(eval $(Feature/$(1))) - $(if $(DUMP),$(call Dumpinfo/Feature,$(1))) -endef - -define Dumpinfo/Feature -$(info Feature: $(TARGET_NAME)_$(1) -Target-Name: $(TARGET_NAME) -Target-Title: $(TARGET_TITLE) -Feature-Name: $(NAME) -$(if $(PRIORITY),Feature-Priority: $(PRIORITY) -)Feature-Description: -$(Feature/$(1)/description) -@@ -) -endef - endif diff --git a/scripts/metadata.pm b/scripts/metadata.pm index bf93271749..18d5e5da24 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -2,13 +2,12 @@ package metadata; use base 'Exporter'; use strict; use warnings; -our @EXPORT = qw(%package %vpackage %srcpackage %category %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); +our @EXPORT = qw(%package %vpackage %srcpackage %category %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); our %package; our %vpackage; our %srcpackage; our %category; -our %features; our %overrides; our @ignore; @@ -181,7 +180,6 @@ sub clear_packages() { %vpackage = (); %srcpackage = (); %category = (); - %features = (); %overrides = (); %usernames = (); %groupnames = (); @@ -190,7 +188,6 @@ sub clear_packages() { sub parse_package_metadata($) { my $file = shift; my $pkg; - my $feature; my $src; my $override; my %ignore = map { $_ => 1 } @ignore; @@ -221,7 +218,6 @@ sub parse_package_metadata($) { }; next unless $src; /^Package:\s*(.+?)\s*$/ and do { - undef $feature; $pkg = {}; $pkg->{src} = $src; $pkg->{name} = $1; @@ -236,23 +232,6 @@ sub parse_package_metadata($) { $vpackage{$1} or $vpackage{$1} = []; unshift @{$vpackage{$1}}, $pkg; }; - /^Feature:\s*(.+?)\s*$/ and do { - undef $pkg; - $feature = {}; - $feature->{name} = $1; - $feature->{priority} = 0; - }; - $feature and do { - /^Target-Name:\s*(.+?)\s*$/ and do { - $features{$1} or $features{$1} = []; - push @{$features{$1}}, $feature unless $src->{ignore}; - }; - /^Target-Title:\s*(.+?)\s*$/ and $feature->{target_title} = $1; - /^Feature-Priority:\s*(\d+)\s*$/ and $feature->{priority} = $1; - /^Feature-Name:\s*(.+?)\s*$/ and $feature->{title} = $1; - /^Feature-Description:/ and $feature->{description} = get_multiline(\*FILE, "\t\t\t"); - next; - }; /^Build-Depends: \s*(.+)\s*$/ and $src->{builddepends} = [ split /\s+/, $1 ]; /^Build-Depends\/(\w+): \s*(.+)\s*$/ and $src->{"builddepends/$1"} = [ split /\s+/, $2 ]; /^Build-Types:\s*(.+)\s*$/ and $src->{buildtypes} = [ split /\s+/, $1 ]; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 41e7108322..e601a77e1b 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -337,31 +337,6 @@ sub print_package_config_category($) { undef $category{$cat}; } -sub print_package_features() { - keys %features > 0 or return; - print "menu \"Package features\"\n"; - foreach my $n (keys %features) { - my @features = sort { $b->{priority} <=> $a->{priority} or $a->{title} cmp $b->{title} } @{$features{$n}}; - print <{target_title}" - default FEATURE_$features[0]->{name} -EOF - - foreach my $feature (@features) { - print <{name} - bool "$feature->{title}" -EOF - $feature->{description} =~ /\w/ and do { - print "\t\thelp\n".$feature->{description}."\n"; - }; - } - print "endchoice\n" - } - print "endmenu\n\n"; -} - sub print_package_overrides() { keys %overrides > 0 or return; print "\tconfig OVERRIDE_PKGS\n"; @@ -376,7 +351,6 @@ sub gen_package_config() { if (scalar glob "package/feeds/*/*/image-config.in") { print "source \"package/feeds/*/*/image-config.in\"\n"; } - print_package_features(); print_package_config_category 'Base system'; foreach my $cat (sort {uc($a) cmp uc($b)} keys %category) { print_package_config_category $cat; From patchwork Mon Jan 8 14:52:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 856842 X-Patchwork-Delegate: mschiffer@universe-factory.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="du5RNaV4"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zFdm43CJMz9ryT for ; Tue, 9 Jan 2018 02:02:12 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=sJ527PdF3nfLCtO6hjrgw/gtPNF5fDSYopY+Ook4n28=; b=du5RNaV4syodoJNCV4z+AgskSB v6YBvkMd3CEcGoWTp4tcnFlX9215EvlxrUb94dk8LnO8N0CrJiOcvQT/SipNtGFYeF6cbDshr7UmA adfr/hZZoEnxNgbMvL3r4u0gug/6BLW2/tP03j4OLXp66muxVLF9z9W/5YINgGcQE8ZYR9PG5AyZM UeAA4I9ws/unvzhTHBC0m2ckn2TN5Gv2pdvJRqHyR7xln6JjyoSDDUfHYpIjGNy0IIUmWgOlzvRig dEDIuxoiI1d+LxXJtNvVtQKBlfpE6YLVLMBfonuZgYA8kHxcyOi+rwJSjxreq06/ua1pO44G4Reoc Q5Lf8wYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYYw4-00051z-Ne; Mon, 08 Jan 2018 15:02:00 +0000 Received: from orthanc.universe-factory.net ([104.238.176.138]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYYtr-0002vu-Nl for lede-dev@lists.infradead.org; Mon, 08 Jan 2018 15:00:21 +0000 Received: from avalon.lan (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 6555E204A5; Mon, 8 Jan 2018 15:52:48 +0100 (CET) From: Matthias Schiffer To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org, jo@mein.io, nbd@nbd.name Date: Mon, 8 Jan 2018 15:52:28 +0100 Message-Id: <8d6fb4e335e1ce91d84eeba5cb48ece7c916d36b.1515421834.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_065944_698025_9125B573 X-CRM114-Status: UNSURE ( 6.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH 15/15] include/package-dumpinfo.mk: don't duplicate source package information for every binary package X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Eventually the BUILDONLY package flag could be replaced by simply creating a package Makefile without any BuildPackage calls. This will fail for now, as BuildPackage also causes the Makefile's compile target etc. to do something useful at all. Signed-off-by: Matthias Schiffer --- include/package-dumpinfo.mk | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index 68a66d0769..8a42be5bd1 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -7,10 +7,17 @@ ifneq ($(DUMP),) -dumpinfo: FORCE + +define SOURCE_INFO +$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS) +)$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS) +)$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES) +) + +endef define Dumpinfo/Package -$(info Package: $(1) +$(info $(SOURCE_INFO)Package: $(1) $(if $(MENU),Menu: $(MENU) )$(if $(SUBMENU),Submenu: $(SUBMENU) )$(if $(SUBMENUDEP),Submenu-Depends: $(SUBMENUDEP) @@ -23,10 +30,7 @@ Menu-Depends: $(MDEPENDS) Provides: $(PROVIDES) $(if $(VARIANT),Build-Variant: $(VARIANT) $(if $(DEFAULT_VARIANT),Default-Variant: $(VARIANT) -))$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS) -)$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS) -)$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES) -)Section: $(SECTION) +))Section: $(SECTION) Category: $(CATEGORY) $(if $(filter nonshared,$(PKGFLAGS)),,Repository: $(if $(FEED),$(FEED),base) )Title: $(TITLE) @@ -47,6 +51,10 @@ $(if $(Package/$(1)/config),Config: $(Package/$(1)/config) @@ )) +SOURCE_INFO := endef +dumpinfo: FORCE + $(if $(SOURCE_INFO),$(info $(SOURCE_INFO))) + endif