From: Luis Chamberlain <mcgrof@kernel.org>
To: kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 2/6] devconfig: ensure unattended-upgrades is not installed on debian
Date: Sun, 23 Mar 2025 04:50:05 -0700 [thread overview]
Message-ID: <20250323115009.269172-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20250323115009.269172-1-mcgrof@kernel.org>
We already remove the package on debian bringups when downloading a
an official but-not-guestfs-official (and so debian custom) image to
build our base images for our guests. Now that we have that stop-gap
measure, be sure we just fail if the package happens to be installed,
and complain to the user about it.
We can easily fix this with just two command so recommend that.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
.../tasks/install-deps/debian/main.yml | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/playbooks/roles/devconfig/tasks/install-deps/debian/main.yml b/playbooks/roles/devconfig/tasks/install-deps/debian/main.yml
index 5624a9f8406a..954f0aede3b2 100644
--- a/playbooks/roles/devconfig/tasks/install-deps/debian/main.yml
+++ b/playbooks/roles/devconfig/tasks/install-deps/debian/main.yml
@@ -1,4 +1,26 @@
---
+- name: Check if unattended-upgrades is installed
+ command: dpkg-query -W -f='${Status}' unattended-upgrades
+ register: unattended_upgrade_status
+ ignore_errors: true
+ changed_when: false
+
+- name: Set fact if unattended-upgrades is installed
+ set_fact:
+ unattended_upgrades_installed: "{{ 'install ok installed' in unattended_upgrade_status.stdout }}"
+
+- name: Verify unattended-upgrades is not installed
+ fail:
+ msg: |
+ The unattended-upgrades package is installed on the base image, this
+ can cause tons of issues with CIs. Fix this by running the following
+ commands:
+
+ make cleancache
+ make bringup
+ when:
+ - unattended_upgrades_installed|bool
+
- name: Upgrade Packages
become: yes
become_method: sudo
--
2.47.2
next prev parent reply other threads:[~2025-03-23 11:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-23 11:50 [PATCH 0/6] debian / libvirt / devconfig fixes Luis Chamberlain
2025-03-23 11:50 ` [PATCH 1/6] scripts/bringup_guestfs.sh: uninstall unattended-upgrades on debian guests Luis Chamberlain
2025-03-23 11:50 ` Luis Chamberlain [this message]
2025-03-23 11:50 ` [PATCH 3/6] libvirt: use consistent pool path variables and use optional yaml output Luis Chamberlain
2025-03-23 11:50 ` [PATCH 4/6] Kconfig: adopt output yaml for KDEVOPS_FIRST_RUN Luis Chamberlain
2025-03-23 11:50 ` [PATCH 5/6] guestfs: add ansible group permisison check on libvirt system uri Luis Chamberlain
2025-03-25 14:53 ` Daniel Gomez
2025-03-29 21:55 ` Luis Chamberlain
2025-03-29 22:43 ` Luis Chamberlain
2025-03-29 22:55 ` Luis Chamberlain
2025-03-23 11:50 ` [PATCH 6/6] gen_nodes: ensure kdevops prefix has no dashes Luis Chamberlain
-- strict thread matches above, loose matches on Subject: below --
2025-03-29 23:01 [PATCH 0/6] debian / libvirt / devconfig fixes Luis Chamberlain
2025-03-29 23:01 ` [PATCH 2/6] devconfig: ensure unattended-upgrades is not installed on debian Luis Chamberlain
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=20250323115009.269172-3-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox