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;