Skip to content

Commit 60549d2

Browse files
committed
createdisk: download qemu-static package instead install
This pr downloads the qemu-static package from the fedora repo and put it to `packages` dir instead installing it because if we install and then remove the fedora repo which is done as part of 2dbbc98 commit then it create a deployment layer for rpm-ostree. Now when we try to install other packages it is going to again check if `qemu-static` package available because rpm-ostree requires all previously layered packages to still be resolvable when you install new ones. If any of them are missing (like qemu-user-static-x86), the operation fails with following error. This PR try to solve it by not installing but just download it and adding this package as part of additional_packages variable so that it can be part of local repo and install without error. ``` + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i id_ecdsa_crc [email protected] -- 'sudo rpm-ostree install cloud-init gvisor-tap-vsock-gvforwarder' Warning: Permanently added '192.168.126.11' (ED25519) to the list of known hosts. Checking out tree 70544e8...done Enabled rpm-md repositories: local Importing rpm-md...done rpm-md repo 'local' (cached); generated: 2025-06-30T17:16:37Z solvables: 173 error: Packages not found: qemu-user-static-x ```
1 parent 718a9c4 commit 60549d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

createdisk.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ gpgcheck=0
157157
EOF
158158
${SCP} /tmp/fedora-updates.repo core@${VM_IP}:/tmp
159159
${SSH} core@${VM_IP} -- "sudo mv /tmp/fedora-updates.repo /etc/yum.repos.d"
160-
${SSH} core@${VM_IP} -- "sudo rpm-ostree install qemu-user-static-x86"
160+
${SSH} core@${VM_IP} -- "mkdir -p ~/packages && dnf download --downloadonly --downloaddir ~/packages qemu-user-static-x86 --resolve"
161161
${SSH} core@${VM_IP} -- "sudo rm -fr /etc/yum.repos.d/fedora-updates.repo"
162+
ADDITIONAL_PACKAGES+=" qemu-user-static-x86"
162163
fi
163164

164165
# Beyond this point, packages added to the ADDITIONAL_PACKAGES variable won’t be installed in the guest

0 commit comments

Comments
 (0)