File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -650,8 +650,11 @@ func (rm *rpmManager) unpackAndMergeUpdates(ctx context.Context, updates unversi
650650
651651 done <<< "$(echo "$json_str" | tr -d '{}\n' | tr ',' '\n')"
652652
653+ # Convert OS_VERSION from X.Y.Z to X.Y format
654+ OS_VERSION_XY=$(echo "$OS_VERSION" | cut -d'.' -f1-2)
655+
653656 tdnf makecache
654- tdnf install -y --releasever=$OS_VERSION --installroot=/tmp/rootfs $packages_formatted
657+ tdnf install -y --releasever=$OS_VERSION_XY --installroot=/tmp/rootfs $packages_formatted
655658
656659 ls /tmp/rootfs/var/lib/rpm
657660 ` ,
@@ -676,7 +679,10 @@ func (rm *rpmManager) unpackAndMergeUpdates(ctx context.Context, updates unversi
676679
677680 for package in $packages; do
678681 package="${package%%.*}" # trim anything after the first "."
679- output=$(tdnf install -y --releasever=$OS_VERSION --installroot=/tmp/rootfs ${package} 2>&1)
682+ # Convert OS_VERSION from X.Y.Z to X.Y format
683+ OS_VERSION_XY=$(echo "$OS_VERSION" | cut -d'.' -f1-2)
684+
685+ output=$(tdnf install -y --releasever=$OS_VERSION_XY --installroot=/tmp/rootfs ${package} 2>&1)
680686
681687 if [ "$IGNORE_ERRORS" = "false" ] && [ $? -ne 0 ]; then
682688 exit $?
You can’t perform that action at this time.
0 commit comments