Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 551DDC001DF for ; Sun, 16 Jul 2023 00:43:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E954C86644; Sun, 16 Jul 2023 02:39:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="NEors0PD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 81DB0862B9; Sun, 16 Jul 2023 02:37:59 +0200 (CEST) Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A2D2D86362 for ; Sun, 16 Jul 2023 02:37:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-78666994bc2so143863939f.0 for ; Sat, 15 Jul 2023 17:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467867; x=1692059867; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FQGtdS0hAzHWAw5wLvgwwHCFfSWHq/ZxZINWBM6o0Y0=; b=NEors0PDmGQ0HYKN2Qe1R7WqjOQi36ik9qAt+S9VIiw8ROsuHVI0H6ZW+pbe/rLjl4 85A7sTMU/64M1iWlwczP55cs6UQLah7A9p9duNFfvmtVVi1FEq6oQsjAtbVEBHaXKBB1 GWSEB54cq+iGsVv8ddiEXNL3n7wipW5VL6+dI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467867; x=1692059867; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FQGtdS0hAzHWAw5wLvgwwHCFfSWHq/ZxZINWBM6o0Y0=; b=C20q2Y5f0jeSxWID4mBI6srcPKd9eQ42/+GQpXvZNiPdelRcg73+X4sn3Pkr228fEe Ma3PqYe8F9LQgU6j/mcCrGFDr5i7prk4Id1os0BuXugHU3HrEkiDfUZUc3hPzF3aAZP0 Tpc/DJ8xApT8dCNDN+wlf6drYrMjQrKJ7EE+ENmLdLpgwimGidJ/uquZFdRdh96IpDSL ArhZSzoqnh3ENywTOJtNzs0P2zdfxYdh8t6/JT/JFtHJ3geqIt5w/wh9W+fURmnXOFHc Wk1MSBIGvWDqpN4DGh2LJQ8JrFCJU3VqnJJSN8rOwGTTAdBDKSGndiPhMTBiJDzbQYqV yUmQ== X-Gm-Message-State: ABy/qLasrHjEVRm8iIkEt1Y3UW74zqNRq3ACAmu3bypR4VGF6MJFydHF vwTSTwfHQj2M1W/K8WUKZqu/kcuuE9C2dMG/h3U= X-Google-Smtp-Source: APBJJlFEop//5rnGvLCr/lEm3DGqJ5ouvu7BEuohwd+F05TYKG05nntyXMYhHJ/8Ga21kMPZd21KpQ== X-Received: by 2002:a6b:5b04:0:b0:783:4f8d:4484 with SMTP id v4-20020a6b5b04000000b007834f8d4484mr9441887ioh.2.1689467867255; Sat, 15 Jul 2023 17:37:47 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id t3-20020a05663801e300b0042b52dc77e3sm3510512jaq.158.2023.07.15.17.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:37:47 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 34/81] buildman: Move output-file setup into one place Date: Sat, 15 Jul 2023 18:36:02 -0600 Message-ID: <20230716003718.231903-35-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.455.g037347b96a-goog In-Reply-To: <20230716003718.231903-1-sjg@chromium.org> References: <20230716003718.231903-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Collect the two parts of the output-file handling into single place. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/control.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/buildman/control.py b/tools/buildman/control.py index b6cd9787fbbd..a9e5b84c4b8e 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -415,6 +415,13 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None, if options.work_in_output: sys.exit(col.build(col.RED, '-w requires that you specify -o')) output_dir = '..' + if options.branch and not options.no_subdirs: + # As a special case allow the board directory to be placed in the + # output directory itself rather than any subdirectory. + dirname = options.branch.replace('/', '_') + output_dir = os.path.join(output_dir, dirname) + if clean_dir and os.path.exists(output_dir): + shutil.rmtree(output_dir) # Work out what subset of the boards we are building if not brds: @@ -461,14 +468,6 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None, options.branch) # Create a new builder with the selected options. - if options.branch: - dirname = options.branch.replace('/', '_') - # As a special case allow the board directory to be placed in the - # output directory itself rather than any subdirectory. - if not options.no_subdirs: - output_dir = os.path.join(output_dir, dirname) - if clean_dir and os.path.exists(output_dir): - shutil.rmtree(output_dir) # For a dry run, just show our actions as a sanity check if options.dry_run: -- 2.41.0.455.g037347b96a-goog