All of lore.kernel.org
 help / color / mirror / Atom feed
From: cel@kernel.org
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH] Squash me
Date: Wed,  9 Oct 2024 15:26:08 -0400	[thread overview]
Message-ID: <20241009192608.1081846-1-cel@kernel.org> (raw)

From: Chuck Lever <chuck.lever@oracle.com>

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 <chuck.lever@oracle.com>
---
 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
 
-- 
2.46.1


                 reply	other threads:[~2024-10-09 19:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241009192608.1081846-1-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.