Skip to content

Commit 375064f

Browse files
committed
Introduce PRE_DOWNLOADED_ADDITIONAL_PACKAGES variable
Having only ADDITIONAL_PACKAGES variable and then adding the packages to it which are already downloaded because those comes from different repo makes the whole installation of additional packages logic break because in that logic we first download those additional packages using yum download then then create local repo and finally push it to VM for installation. Since some packages like qemu-user-static is comes from fedora repo and we just can't enable this because it might affect other packages and we hit situation like 718a9c4 one. So this PR separate addtional packages which can be downloaded from official repo to other packages which comes from different repo but at the installation time it should be creating single layer on ostree side. Signed-off-by: Praveen Kumar <[email protected]>
1 parent 60549d2 commit 375064f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

createdisk-library.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ enabled=1
202202
gpgcheck=0
203203
EOF'"
204204
# Install these rpms to VM
205-
${SSH} core@${vm_ip} -- "sudo rpm-ostree install $ADDITIONAL_PACKAGES"
205+
${SSH} core@${vm_ip} -- "sudo rpm-ostree install $ADDITIONAL_PACKAGES $PRE_DOWNLOADED_ADDITIONAL_PACKAGES"
206206

207207
# Remove the packages and repo from VM
208208
${SSH} core@${vm_ip} -- sudo rm -fr /home/core/packages

createdisk.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ OPENSHIFT_VERSION=$(${JQ} -r .clusterInfo.openshiftVersion $INSTALL_DIR/crc-bund
1717
BASE_DOMAIN=$(${JQ} -r .clusterInfo.baseDomain $INSTALL_DIR/crc-bundle-info.json)
1818
BUNDLE_TYPE=$(${JQ} -r .type $INSTALL_DIR/crc-bundle-info.json)
1919
ADDITIONAL_PACKAGES="cloud-init gvisor-tap-vsock-gvforwarder"
20+
PRE_DOWNLOADED_ADDITIONAL_PACKAGES=""
2021

2122
case ${BUNDLE_TYPE} in
2223
microshift)
@@ -159,7 +160,7 @@ EOF
159160
${SSH} core@${VM_IP} -- "sudo mv /tmp/fedora-updates.repo /etc/yum.repos.d"
160161
${SSH} core@${VM_IP} -- "mkdir -p ~/packages && dnf download --downloadonly --downloaddir ~/packages qemu-user-static-x86 --resolve"
161162
${SSH} core@${VM_IP} -- "sudo rm -fr /etc/yum.repos.d/fedora-updates.repo"
162-
ADDITIONAL_PACKAGES+=" qemu-user-static-x86"
163+
PRE_DOWNLOADED_ADDITIONAL_PACKAGES+=" qemu-user-static-x86"
163164
fi
164165

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

0 commit comments

Comments
 (0)