From patchwork Tue Oct 8 23:25:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13827203 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 6401B1E0B8C for ; Tue, 8 Oct 2024 23:25:30 +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=1728429930; cv=none; b=hxc3K1AyTIWuina65Lm3/RH7VrEwCw2/h98Mn77t+XZLQY2cmw5i5FADkR+tvWTUPvKi2WOk1asz/559B8+scEx46+NLdp/GicgZU7tYYNuzu9YJQVoDZzySqHGXrzjplxlO41XIpz/frK7mTRabRWplxXm6uRhYQ3TCttMxEgs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728429930; c=relaxed/simple; bh=yU/MHIgZ+JmYQmsYcX9hd1nzz9SBA9QwecVO/uaqIwo=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=WrTEpkaIynB33w4UI8qDknw7NZGA3aqt2oRTsapj60UChTf2Z4AHtKw5DZz5Ce5MOvYe7Dzn+eT4MMfcK7ssfxkR6REV0iVjtYeJkXMpJtPNf9dNbIXuzrbzXWSR+bAKQIWqhK6IfLcdRCSNltMba8OI05fHeJvXSJYs7pcBrtk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fvuq/Fxm; 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="fvuq/Fxm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBBFBC4CEC7 for ; Tue, 8 Oct 2024 23:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728429929; bh=yU/MHIgZ+JmYQmsYcX9hd1nzz9SBA9QwecVO/uaqIwo=; h=Date:From:To:Subject:From; b=fvuq/FxmsTxkzvQxjvjJBi05rEOjhl+oTyQXiwFLmOdcQtIJC/F/HoIbb9SKgHO+R 36+KIDz4R/OoBzXAGt3nprXNyJCE6SCyeWP/h9vsV6wYw9vEVPB+iuGxFC4LY6M9F9 w/xjKkyLZ3A2gkHlUSMw8MzxkmCWLx5ZK+wShIkVG6/55dWLhgKPTqCwzHJSSBWwKH 673FH4gqNPdW9QLd5ji79ATKPBnCn7MW8IoDDP/ZTo0xFt6WuOxDcaG/Qz1zYNp8Gk Le+Thrcabaa3agvtGBhXOYn4AA5HRdStN4WqZjvheQyjSnAx9JeDAECsmCn63U7dU5 m7ZZ8zos3/ITg== Date: Tue, 8 Oct 2024 16:25:28 -0700 From: Luis Chamberlain To: kdevops@lists.linux.dev Subject: [RFT] linux: fix ignore hunt for config if config-kdevops is defined Message-ID: Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Commit f70bf0c0ea6b411d9 ("linux: fix heuristic with missing configuration") added support for looking for the latest linux-next config if your ref does not have an associated kernel configuration. This failed to capture the special-casing of config-kdevops special file, which let's you stick to that configuration for your builds. Fix this. Fixes: f70bf0c0ea6b411d9 ("linux: fix heuristic with missing configuration") Reported-by: Chuck Lever Signed-off-by: Luis Chamberlain --- Just requires testing. playbooks/roles/bootlinux/tasks/main.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/playbooks/roles/bootlinux/tasks/main.yml b/playbooks/roles/bootlinux/tasks/main.yml index 9606d953a521..aab672cd9073 100644 --- a/playbooks/roles/bootlinux/tasks/main.yml +++ b/playbooks/roles/bootlinux/tasks/main.yml @@ -260,26 +260,34 @@ 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: item.path is search('config-next-(\\d{8})') + when: + - not kernel_config.stat.exists + - item.path is search('config-next-(\\d{8})') no_log: true delegate_to: localhost - name: Sort configs based on date extracted from filename set_fact: sorted_configs: "{{ configs_with_dates | selectattr('date', 'defined') | sort(attribute='date', reverse=True) | map(attribute='file') | list }}" - when: configs_with_dates | length > 0 + when: + - not kernel_config.stat.exists + - configs_with_dates | length > 0 delegate_to: localhost - name: Set latest linux-next config if configs are found set_fact: latest_linux_next_config: "{{ sorted_configs[0] }}" - when: sorted_configs | length > 0 + when: + - not kernel_config.stat.exists + - sorted_configs | length > 0 delegate_to: localhost - name: Use the specific kernel config or fallback to the latest linux-next set_fact: linux_config: "{{ target_linux_config | default('') if kernel_config.stat.exists else (latest_linux_next_config | default('') | basename) }}" - when: latest_linux_next_config is defined + when: + - not kernel_config.stat.exists + - latest_linux_next_config is defined delegate_to: localhost - name: Verify config used