From patchwork Thu Jan 21 20:44:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francois Perrad X-Patchwork-Id: 571345 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 936FA1402F0 for ; Fri, 22 Jan 2016 07:45:23 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pQm1cRSO; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CE30733375; Thu, 21 Jan 2016 20:45:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3KhSFjKwTFK7; Thu, 21 Jan 2016 20:45:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3108733380; Thu, 21 Jan 2016 20:45:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D27891BFA5C for ; Thu, 21 Jan 2016 20:45:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9B4F18C434 for ; Thu, 21 Jan 2016 20:45:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N4dycJVMgfFV for ; Thu, 21 Jan 2016 20:45:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by whitealder.osuosl.org (Postfix) with ESMTPS id EA5F58C430 for ; Thu, 21 Jan 2016 20:45:11 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id b14so100419661wmb.1 for ; Thu, 21 Jan 2016 12:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GGfXy5HBaam2oNHYlwD9VUrPFu9j9yVJOenlHzr8xLQ=; b=pQm1cRSOu9koHwrJW44I0fNOaUwZBSAEFKzPtd4/2jdZM9XpSA9uLhwmi3pvjfOopv ahowfT78ywJWHNJSjgcYcFop7UXUH3/pc/AVDYQBt2XiqVdznXGEeRAiH5HBdQWrgNtu LhLTiIvq67W2rC46sq5HyGse0MukbBfW5Nt4yDyl7G2z4lLWYmmM9OFI6t/wFK+RoKiP SRFhD5ZJYmZ+4cYgx9MKoNMS0D4OcfTroxHD8SGvxXLQD43LyC2B8Xcl9N9q8RefSbkw /1W2q2F87sfhPNatRL/Mn3BpCoHiT4R4Fi3Gi1J0cdYrLqWeA/lrns8Wn+ePzVeNQY03 tDcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GGfXy5HBaam2oNHYlwD9VUrPFu9j9yVJOenlHzr8xLQ=; b=ToFIaMkX8cbNvRwxEvqvXIWxqEcILHdi1IKSB4irtsNpVvMBQr6RibpTDmys3jzitG 5B3DCw5/aQ8JofS2i6uUoAZvMTvilrVPvmmlUiA9zm2afxHU56nZmIS2vzhHePZmSCiW qwBt3dWwFYhyTR4geM15Mv66ebmRs2mq+Ivah0o8YbipP265FAOD9E5uGUMFAseOUWeO rUS+wyXNEMdgcgyqZrCg0rtIuMkOnp33jTyryuM9qL1CR/DLJWr6eMYhXoZ1QSJV+OHk DynNmrifxjjOTCrqGPLSDLk9/IAj96Y9Tc5sy7dD01Nn6hIe/hQxn4hjEuTu+EPn8nz2 dQjQ== X-Gm-Message-State: AG10YOT6gkipftcNhhz7VIGZ7DsVr2ssthCtYn7SFnYx9/mFa61j2AiRYjMFQcHjcMaNOQ== X-Received: by 10.28.64.131 with SMTP id n125mr11735679wma.65.1453409111912; Thu, 21 Jan 2016 12:45:11 -0800 (PST) Received: from localhost.localdomain (175.7.83.79.rev.sfr.net. [79.83.7.175]) by smtp.gmail.com with ESMTPSA id j3sm4472435wmj.19.2016.01.21.12.45.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jan 2016 12:45:11 -0800 (PST) From: Francois Perrad X-Google-Original-From: Francois Perrad To: buildroot@busybox.net Date: Thu, 21 Jan 2016 21:44:53 +0100 Message-Id: <1453409093-22012-2-git-send-email-francois.perrad@gadz.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453409093-22012-1-git-send-email-francois.perrad@gadz.org> References: <1453409093-22012-1-git-send-email-francois.perrad@gadz.org> Subject: [Buildroot] [V2 2/2] scancpan: use recommend & test flags only at first level X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Francois Perrad --- support/scripts/scancpan | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/support/scripts/scancpan b/support/scripts/scancpan index 72cca1a..6c70cfb 100755 --- a/support/scripts/scancpan +++ b/support/scripts/scancpan @@ -552,10 +552,10 @@ sub find_license_files { } sub fetch { - my ($name, $need_target, $need_host) = @_; + my ($name, $need_target, $need_host, $top) = @_; $need_target{$name} = $need_target if $need_target; $need_host{$name} = $need_host if $need_host; - unless ($dist{$name}) { + unless ($dist{$name} && !$top) { say qq{fetch ${name}} unless $quiet; my $result = $mcpan->release( distribution => $name ); $dist{$name} = $result; @@ -570,19 +570,19 @@ sub fetch { next if $modname eq q{perl}; next if $modname =~ m|^Alien|; next if $modname =~ m|^Win32|; - next if !$test && $modname =~ m|^Test|; + next if !($test && $top) && $modname =~ m|^Test|; next if Module::CoreList::is_core( $modname, undef, $] ); # we could use the host Module::CoreList data, because host perl and # target perl have the same major version next if ${$dep}{phase} eq q{develop}; - next if !$test && ${$dep}{phase} eq q{test}; + next if !($test && $top) && ${$dep}{phase} eq q{test}; my $distname = $mcpan->module( $modname )->{distribution}; if (${$dep}{phase} eq q{runtime}) { if (${$dep}{relationship} eq q{requires}) { $runtime{$distname} = 1; } else { - $optional{$distname} = 1 if $recommend; + $optional{$distname} = 1 if $recommend && $top; } } else { # configure, build @@ -608,7 +608,7 @@ sub fetch { foreach my $distname (@ARGV) { # Command-line's distributions - fetch( $distname, !!$target, !!$host ); + fetch( $distname, !!$target, !!$host, 1 ); } say scalar keys %dist, q{ packages fetched.} unless $quiet;