From patchwork Wed Oct 9 19:26:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13829139 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 652A31B3F30 for ; Wed, 9 Oct 2024 19:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728501972; cv=none; b=edpJAFwDElzcSztmWfk8EtquJAJ7/C5WqvLMV3wVm8oduPMGhQtnTRyy6/HG7W0j9u3Gvx+rYpB9DS6SprOC0EgDMudTbGTjnZ3rtwYFbLW3vrjpuikX9/3Acb6MC13mKTDwn5PC4Yk8/YRfeLC4UnGBg2GpWD4kP9N7PYortgU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728501972; c=relaxed/simple; bh=gZZiPe4yW24v0KtjwNB2Mn56lGcZUYK/RWBT9cKob0E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=e6hI9KrSTEYpmK6jy2clKjOy2+tvmIwUxOw2TtMVuL8B3+DABNrOx6vjDj9vWyba179szxTa7eQqVgNAE/iIpPX0TEwCsUh3bwi/5IS6GyyZqQdp75bo6vmlaC+4stQqJrw822KBA3MiGcelDn2GYWZ9GTx68x7z3Xv2X1gQANY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cCMBqhWd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cCMBqhWd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7D1EC4CEC3; Wed, 9 Oct 2024 19:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728501972; bh=gZZiPe4yW24v0KtjwNB2Mn56lGcZUYK/RWBT9cKob0E=; h=From:To:Cc:Subject:Date:From; b=cCMBqhWdT/aULuf/qMUdjYDSo5oyt9dyOiRcYLO0048X4XudAvGGSlpiNRCMPhZsZ M8rcfDW6k8qAzPfBaOGUUhieshLsbH/VaowbSgK2sH3jEjrSjkuKK49MiqrOnwwFeA AsiReb6dnKcwyFbdQLDgJl395Eb5dnxQ8n1C/1H71fS+GvXwVsJSA2kQ1ccwmsZDiY TmEpVIzqLh2VcV/zOt2VH+DnsHtBDTLODcEI38fymAdWxf7CKGwj2E74VeyZ2/fzFw EsDTGU5qXbgvIFS4SBkSJREV6WG42MaJQEOU2Wysdp6fIzYGLxHvMugpHioclszUKZ a6Rn3jOiB1TRg== From: cel@kernel.org To: Cc: Chuck Lever Subject: [PATCH] Squash me Date: Wed, 9 Oct 2024 15:26:08 -0400 Message-ID: <20241009192608.1081846-1-cel@kernel.org> X-Mailer: git-send-email 2.46.1 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever A few more logic changes to get config-kdevops working again. To be squashed into: https://lore.kernel.org/kdevops/ABA3A866-8648-46D0-B0FF-CAAD6E42E40A@oracle.com/T/#t Comments, corrections, questions, testing results welcome. Signed-off-by: Chuck Lever --- playbooks/roles/bootlinux/tasks/main.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/bootlinux/tasks/main.yml b/playbooks/roles/bootlinux/tasks/main.yml index aab672cd9073..7c3c0d6279a9 100644 --- a/playbooks/roles/bootlinux/tasks/main.yml +++ b/playbooks/roles/bootlinux/tasks/main.yml @@ -245,6 +245,7 @@ path: "{{ role_path }}/templates/{{ target_linux_config }}" register: kernel_config delegate_to: localhost + when: not config_kdevops.stat.exists - name: Find all linux-next configs find: @@ -254,13 +255,16 @@ recurse: no register: found_configs delegate_to: localhost - when: not kernel_config.stat.exists + when: + - not config_kdevops.stat.exists + - not kernel_config.stat.exists - name: Extract the date from the filenames set_fact: configs_with_dates: "{{ configs_with_dates | default([]) + [{'file': item.path, 'date': (item.path | regex_search('config-next-(\\d{8})')).split('-')[-1]}] }}" loop: "{{ found_configs.files }}" when: + - not config_kdevops.stat.exists - not kernel_config.stat.exists - item.path is search('config-next-(\\d{8})') no_log: true @@ -270,6 +274,7 @@ set_fact: sorted_configs: "{{ configs_with_dates | selectattr('date', 'defined') | sort(attribute='date', reverse=True) | map(attribute='file') | list }}" when: + - not config_kdevops.stat.exists - not kernel_config.stat.exists - configs_with_dates | length > 0 delegate_to: localhost @@ -278,6 +283,7 @@ set_fact: latest_linux_next_config: "{{ sorted_configs[0] }}" when: + - not config_kdevops.stat.exists - not kernel_config.stat.exists - sorted_configs | length > 0 delegate_to: localhost @@ -286,7 +292,7 @@ set_fact: linux_config: "{{ target_linux_config | default('') if kernel_config.stat.exists else (latest_linux_next_config | default('') | basename) }}" when: - - not kernel_config.stat.exists + - not config_kdevops.stat.exists - latest_linux_next_config is defined delegate_to: localhost