File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -294,20 +294,23 @@ RUN --mount=target=/host \
294294 EXTERNAL_KIT_REPOS+=("--repofrompath=${REPO_NAME},${REPO_PATH}" --enablerepo "${REPO_NAME}" ); \
295295 done && \
296296 echo "${EXTERNAL_KIT_REPOS[@]}" && \
297+ mkdir -p /local/rpms && \
298+ download_dir_opt="$(dnf install --help | grep -Fwq downloaddir && echo " --downloaddir /local/rpms" ||:)" && \
297299 dnf -y \
298300 --disablerepo '*' \
299301 --repofrompath repo,./rpmbuild/RPMS \
300302 --enablerepo 'repo' \
301303 "${KIT_REPOS[@]}" \
302304 "${EXTERNAL_KIT_REPOS[@]}" \
303305 --nogpgcheck \
304- --downloadonly \
305- --downloaddir . \
306306 --forcearch "${ARCH}" \
307- install $(printf "bottlerocket-%s\n " metadata ${PACKAGES}) && \
308- mkdir -p /local/rpms && \
309- mv *.rpm /local/rpms && \
310- createrepo_c /local/rpms && \
307+ --setopt=cachedir=/local/rpms \
308+ install \
309+ --downloadonly \
310+ ${download_dir_opt} \
311+ $(printf "bottlerocket-%s\n " metadata ${PACKAGES}) && \
312+ find /local/rpms -mindepth 2 -type f -name '*.rpm' -exec mv -t /local/rpms {} + && \
313+ find /local/rpms -mindepth 1 ! -name '*.rpm' -delete && \
311314 rm /output && \
312315 rm /bypass && \
313316 echo ${NOCACHE}
Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ popd >/dev/null
4545
4646# Merge them together into a unified archive.
4747pushd " ${KIT_DIR} " > /dev/null
48- tar cf " ${OUTPUT_DIR} /${KMOD_KIT_FULL} .tar" " ${KMOD_KIT} "
49- xz -T0 " ${OUTPUT_DIR} /${KMOD_KIT_FULL} .tar"
48+ XZ_OPT=' -T0' tar cfJ " ${OUTPUT_DIR} /${KMOD_KIT_FULL} .tar.xz" " ${KMOD_KIT} "
5049popd > /dev/null
5150
5251# Create friendly symlinks.
You can’t perform that action at this time.
0 commit comments