From patchwork Thu Aug 10 16:31:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1819953 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=OZA3CwKo; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RMCD10YTXz1yfB for ; Fri, 11 Aug 2023 02:33:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38658868EC; Thu, 10 Aug 2023 18:32:31 +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="OZA3CwKo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C1E7868D8; Thu, 10 Aug 2023 18:32:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (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 81C5E86851 for ; Thu, 10 Aug 2023 18:32:26 +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-il1-x132.google.com with SMTP id e9e14a558f8ab-34978cc9e53so3935805ab.2 for ; Thu, 10 Aug 2023 09:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1691685145; x=1692289945; 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=HNdECsJMXLXnIj3IBa994c6pZ7Je8x3s2gJaScMo/sU=; b=OZA3CwKo0LVqRJ3/1MGMKAII7CQsPe6Wbch0dhaarykSJg7XPn0Ve+01KqEfsyl1N6 /xIOZ5sMjULuJnCdoRVqdbxJes/vyp6wjk3i+bQc/urttlzYUAsRSVBsDmCK7qXX82Gt CQSUq6MZKoc5EHkYNxWuYCNjHTIBXq/8kzvkA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691685145; x=1692289945; 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=HNdECsJMXLXnIj3IBa994c6pZ7Je8x3s2gJaScMo/sU=; b=O1c6Bh0Xwf4X5wb+oY4OOOkq4tvPrNJ0Di6m3h+7mVKmqguPY7tVRI2pSY3Ezd9SFy cA0oef6ksSp9iVsBd6btzg44pqHhJaHvTCt+Y+C8YsZD2BVJ0UGAgbBuZEVmdKwwbkEs vFZENKhbDmMPGoOPHrwxXD2SGlM+p1/gTvvCQmkYg3ZAqEU4HqAYdP/Vp7h55lJcnK3n wH+YNe5TMCuM09LPSVg1vf3XBKgcXSIQFEq5q9wrk+3DPORnQWgMbO0cNSTzejyO2ANJ biP6w6b5qZkAxrI4El18owP29G9jtguhCpSbGiK5vnHpMz9xenZx82OrAJVoCxOH3Fd4 2jAQ== X-Gm-Message-State: AOJu0YzaeC1uh3DkRwYkc+n1TkQSqCuVnvhGJA/k3qofBeKE/DDCmiZj fH/dvC64dUskWUrrCOhXl7tQj4Wx+IUW2yvOl9c= X-Google-Smtp-Source: AGHT+IGoq+SqHqkK5BPVFJLuGvG601HiezI+MP9RL9m83sHNHA9sr1L2crxwEn9sq/+UTePRpLi3WQ== X-Received: by 2002:a92:c203:0:b0:345:a319:ba83 with SMTP id j3-20020a92c203000000b00345a319ba83mr3249745ilo.29.1691685145188; Thu, 10 Aug 2023 09:32:25 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:e0a2:950d:33f0:fddc]) by smtp.gmail.com with ESMTPSA id u21-20020a02aa95000000b0042b28813816sm487309jai.14.2023.08.10.09.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 09:32:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 07/28] moveconfig: Drop check_defconfig() and update_dotconfig() Date: Thu, 10 Aug 2023 10:31:39 -0600 Message-ID: <20230810163212.2368374-8-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog In-Reply-To: <20230810163212.2368374-1-sjg@chromium.org> References: <20230810163212.2368374-1-sjg@chromium.org> MIME-Version: 1.0 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 These functions are not needed anymore. Drop them. Signed-off-by: Simon Glass --- tools/moveconfig.py | 62 ++------------------------------------------- 1 file changed, 2 insertions(+), 60 deletions(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index b32a9002b18..4f9bea0827f 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -348,48 +348,6 @@ class KconfigParser: return arch - def update_dotconfig(self): - """Parse files for the config options and update the .config. - - This function parses the generated .config and include/autoconf.mk - searching the target options. - Move the config option(s) to the .config as needed. - - Args: - defconfig: defconfig name. - - Returns: - Return a tuple of (updated flag, log string). - The "updated flag" is True if the .config was updated, False - otherwise. The "log string" shows what happend to the .config. - """ - updated = False - suspicious = False - - autoconf_path = self.autoconf - - dotconfig_lines = read_file(self.dotconfig) - - autoconf_lines = read_file(autoconf_path) - - log = '' - - return (updated, suspicious, log) - - def check_defconfig(self): - """Check the defconfig after savedefconfig - - Returns: - Return additional log if moved CONFIGs were removed again by - 'make savedefconfig'. - """ - - log = '' - - defconfig_lines = read_file(self.defconfig) - - return log - class DatabaseThread(threading.Thread): """This thread processes results from Slot threads. @@ -452,7 +410,6 @@ class Slot: self.parser = KconfigParser(args, self.build_dir) self.state = STATE_IDLE self.failed_boards = set() - self.suspicious_boards = set() def __del__(self): """Delete the working directory @@ -588,20 +545,10 @@ class Slot: def do_savedefconfig(self): """Update the .config and run 'make savedefconfig'.""" - - (updated, suspicious, log) = self.parser.update_dotconfig() - if suspicious: - self.suspicious_boards.add(self.defconfig) - self.log += log - - if not self.args.force_sync and not updated: + if not self.args.force_sync: self.finish(True) return - if updated: - self.log += color_text(self.args.color, COLOR_LIGHT_GREEN, - 'Syncing by savedefconfig...\n') - else: - self.log += 'Syncing by savedefconfig (forced by option)...\n' + self.log += 'Syncing by savedefconfig (forced by option)...\n' cmd = list(self.make_cmd) cmd.append('savedefconfig') @@ -611,11 +558,6 @@ class Slot: def update_defconfig(self): """Update the input defconfig and go back to the idle state.""" - - log = self.parser.check_defconfig() - if log: - self.suspicious_boards.add(self.defconfig) - self.log += log orig_defconfig = os.path.join('configs', self.defconfig) new_defconfig = os.path.join(self.build_dir, 'defconfig') updated = not filecmp.cmp(orig_defconfig, new_defconfig)