From patchwork Mon Jan 7 22:05:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1021629 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LVlGGFBa"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.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 43YTyW6Jx0z9sD9 for ; Tue, 8 Jan 2019 09:07:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 51FFB865E0; Mon, 7 Jan 2019 22:07:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y+IGZPhA7Xtj; Mon, 7 Jan 2019 22:07:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 612B486CAA; Mon, 7 Jan 2019 22:07:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 73EF41C3354 for ; Mon, 7 Jan 2019 22:06:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2F90085F7E for ; Mon, 7 Jan 2019 22:06:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 42vzqrigOPVJ for ; Mon, 7 Jan 2019 22:06:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D6CFF85F87 for ; Mon, 7 Jan 2019 22:06:09 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id x30so2385874edx.2 for ; Mon, 07 Jan 2019 14:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=M2EFo5L9u4hg/zvOPTj4QxndvDabaFvaxpUN1Dy030g=; b=LVlGGFBa49YiNXFqV6CDk0BI6XoG70IZejQeKz8xCIkbc31BkARLwXf3rzECC6jEh7 L7QddgmFHBCQijrbnPr6hwlFg+unnNYLq3l5uJfnOYeuMfh6Aca1hOjzsTm2WiUY/q4D ngswb8WyJqdphl+io+9Ar+xEoZ+j4F6YqMe9sdIwKdVMLEL9O+uW1OHvw31rguxqf4ly qMM+vkxKaqpOt2HME5sbX2147QDixiqU8ZjzYWyZrz5tfZq96879zfH5fRPGhdQ0u3Ir RvHwtO613vdIrtQpG/KTPESgLFGm6YKu8WNYhHQf3AqdtKSkXpSxPLveIs4XTspiWzJ+ gcDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=M2EFo5L9u4hg/zvOPTj4QxndvDabaFvaxpUN1Dy030g=; b=QMdFT35UfNnxx66s2EqqDEfOn2eU4t+pXNlgLYOKq2pyehR/NZgbCjGgt8KMCfFB5R Vt6OkMuy4/MkPAq7QxMzDYXldG+q2T5ZrxHWQpLmDy11MjND5DlOtoDGi6+QERPhuG1N s6O07dhOJcGl0g8SbV2YhH5eIUbErnfwD1bzL0znX9JEfb4ahdfVIWA/LuGOmrCrUG95 f/tkTFd6i+ssY7atqyorx18JY2YsvYxb6c4UqAwa/G7/3YiCwaBXK2h7m4nbb35dcVfY OdyJxzsX6lA+cdhwaVsjUAiP/3NQTGeAcRlk4zLthr1jmjZF5Lu7Sq/o/JtQWCBkdhnI 01YQ== X-Gm-Message-State: AA+aEWYWDxtf8WMwOaSe02xzDqJ6QaJ3iRczENBqXPFnY912PICrqK2p 0NkCXPd/5dg0+0xVSdPeOXtHdUoU X-Google-Smtp-Source: AFSGD/XtaxvnD3+iew6ii79D77wTxWp0y1JrmPAzXiWXvhrE2ajLypKD317h3J+JI3T86CZfjPXjTg== X-Received: by 2002:a17:906:9154:: with SMTP id y20-v6mr48277616ejw.8.1546898768101; Mon, 07 Jan 2019 14:06:08 -0800 (PST) Received: from scaer.home ([2a01:cb19:829a:2800:68e8:7a61:9bb9:12a]) by smtp.gmail.com with ESMTPSA id d56sm31799589ede.76.2019.01.07.14.06.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 14:06:07 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 7 Jan 2019 23:05:37 +0100 Message-Id: <81ed4adcc2260053f46fc0f1cb75a896828896e6.1546898693.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 15/19] support/check-uniq-files: use argparse to enfore required options X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: "Yann E. MORIN" --- support/scripts/check-uniq-files | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/support/scripts/check-uniq-files b/support/scripts/check-uniq-files index f42edeb534..2cee95d048 100755 --- a/support/scripts/check-uniq-files +++ b/support/scripts/check-uniq-files @@ -20,21 +20,13 @@ def str_decode(s): def main(): parser = argparse.ArgumentParser() - parser.add_argument('packages_file_list', nargs='*', + parser.add_argument('packages_file_list', nargs=1, help='The packages-file-list to check from') - parser.add_argument('-t', '--type', metavar="TYPE", + parser.add_argument('-t', '--type', metavar="TYPE", required=True, help='Report as a TYPE file (TYPE is either target, staging, or host)') args = parser.parse_args() - if not len(args.packages_file_list) == 1: - sys.stderr.write('No packages-file-list was provided.\n') - return False - - if args.type is None: - sys.stderr.write('No type was provided\n') - return False - file_to_pkg = defaultdict(set) file_md5 = defaultdict(set) for record in parse_pkg_file_list(args.packages_file_list[0]):