From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 85BD3192D68 for ; Mon, 28 Jul 2025 01:14:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753665280; cv=none; b=NVrS5EaImVOI6gM/HIZLkqhCsYqS0D/e69ggGqzQeldFTHpT2ix5pcFF0aUxVsZvB7ZoP4n435b6JsL1MT0/IEPLVrGgXsTdPQ7Mr8VeDNQZuNECos1UDO5GTA72Rhbw4YXQOdOURcZXc2bU1RLvQ16aZUJKvWoTipnaQkUdTKo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753665280; c=relaxed/simple; bh=rxArCWJTOwB3koIcRYV3BhRLJO6Mlwxi0cxsOQN82gQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SucYbTFYUyTh/6txhDIeDyAsMVgLyw0iwRV6t9AxtJ2izC8KsT8XP6MHZoAgaX2rfqsD8GK/fnjsBNMqqeVBgDvfdKLqZrFHes+9RuO8tdQDer6to2EdnwePAr94a7dJXmRjyoLLEo62QeTB+ZdW3RUJzYSdjZe/Jisct7YScrU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=gLfUX5Pk; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="gLfUX5Pk" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=DkNyc/bRLUx0bDCU+t5wmsDaA3ebfarrUustT+S7lTw=; b=gLfUX5PkG9FSqxkxFX8GMBjsVJ /1pZ3jh/kxCchUX24niSxERswUcyvj3QvaCk2LVQcyiZeIJF5WI1hNbFv0ssHeZ98yvhR8O6coXLq UYK085TvaVu8kHv0xVlF04poiEPlG17QldtVOWS4jQMGsBnV1M4wCdZmciueBl04pg44+aYmBEJLd jg49qzcC1IdZaFDvMI3NPtNfsQsJzFYdeCrZd3IkfFBaNe5qqRII/oAUOKlX1N8J03GNQH39m/ih+ 9W3p6jA5SeTAR9QslbXJ+z/sCfqYiG2rSXV8naPGeVepjUO/VVRgUU27wdM8BfQoPr88t0CYHEGKA /T8pnk0A==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugCRo-0000000DPl9-25Xu; Mon, 28 Jul 2025 01:14:36 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Chuck Lever Subject: [PATCH v2 27/33] bootlinux: Pick up kernel release info for pre-built packages Date: Sun, 27 Jul 2025 18:14:27 -0700 Message-ID: <20250728011434.3197091-28-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250728011434.3197091-1-mcgrof@kernel.org> References: <20250728011434.3197091-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain From: Chuck Lever Signed-off-by: Chuck Lever --- .../bootlinux/tasks/update-grub/install.yml | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/playbooks/roles/bootlinux/tasks/update-grub/install.yml b/playbooks/roles/bootlinux/tasks/update-grub/install.yml index 350090a1..f765bc20 100644 --- a/playbooks/roles/bootlinux/tasks/update-grub/install.yml +++ b/playbooks/roles/bootlinux/tasks/update-grub/install.yml @@ -96,6 +96,8 @@ - name: Get the name of the kernel release to install (source tree) tags: - vars + when: + - not workflow_linux_packaged|bool block: - name: Set the pathname used to extract the kernel release ansible.builtin.set_fact: @@ -127,13 +129,25 @@ when: - kernelrelease is not defined -- name: Get the kernel release of the kernel to be installed - tags: - - vars - ansible.builtin.set_fact: - kernelrelease: "{{ slurped_kernel_release.content | b64decode | trim }}" +- name: Get the name of the kernel release to install (package) when: - - kernel_release_file.stat.exists + - workflow_linux_packaged|bool + block: + - name: Set the pathname used to extract the kernel release + ansible.builtin.set_fact: + kernelrelease_file: "{{ bootlinux_artifacts_dir }}/kernel.release" + + - name: Stat {{ kernelrelease_file }} + delegate_to: localhost + ansible.builtin.stat: + path: "{{ kernelrelease_file }}" + register: kernel_release_file + + - name: Get the kernel release of packaged kernel to be installed + ansible.builtin.set_fact: + kernelrelease: "{{ lookup('ansible.builtin.file', kernelrelease_file) | trim }}" + when: + - kernel_release_file.stat.exists - name: Construct the command line to determine the default boot entry tags: -- 2.47.2