builder: fedora: ensure images are up-to-date

Update the system at the end of the installation, so the generated image
is up-to-date.  This also removes the need to manually update dnf on
i686 and x86_64.
This commit is contained in:
Pino Toscano
2016-03-17 10:39:11 +01:00
parent a5bf0e7e64
commit 9775777a55
6 changed files with 18 additions and 12 deletions

View File

@@ -64,6 +64,9 @@ poweroff
# Rerun dracut for the installed kernel (not the running kernel):
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
# Ensure the installation is up-to-date:
dnf -y --best upgrade
%end
EOF

View File

@@ -64,6 +64,9 @@ poweroff
# Rerun dracut for the installed kernel (not the running kernel):
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
# Ensure the installation is up-to-date:
dnf -y --best upgrade
%end
EOF

View File

@@ -73,6 +73,9 @@ popd
# Rerun dracut for the installed kernel (not the running kernel):
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
# Ensure the installation is up-to-date:
dnf -y --best upgrade
%end
EOF
@@ -97,10 +100,4 @@ virt-install \
--nographics \
--noreboot
# https://bugzilla.redhat.com/show_bug.cgi?id=1280029
# (Only for Fedora 23)
if [ "$version" = "23" ]; then
virt-customize -a $output --install "https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-conf-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-yum-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/python3-dnf-1.1.4-2.fc23.noarch.rpm"
fi
source $(dirname "$0")/compress.sh $output

View File

@@ -64,6 +64,9 @@ poweroff
# Rerun dracut for the installed kernel (not the running kernel):
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
# Ensure the installation is up-to-date:
dnf -y --best upgrade
%end
EOF

View File

@@ -64,6 +64,9 @@ poweroff
# Rerun dracut for the installed kernel (not the running kernel):
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
# Ensure the installation is up-to-date:
dnf -y --best upgrade
%end
EOF

View File

@@ -73,6 +73,9 @@ popd
# Rerun dracut for the installed kernel (not the running kernel):
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
# Ensure the installation is up-to-date:
dnf -y --best upgrade
%end
EOF
@@ -97,10 +100,4 @@ virt-install \
--nographics \
--noreboot
# https://bugzilla.redhat.com/show_bug.cgi?id=1280029
# (Only for Fedora 23)
if [ "$version" = "23" ]; then
virt-customize -a $output --install "https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-conf-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-yum-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/python3-dnf-1.1.4-2.fc23.noarch.rpm"
fi
source $(dirname "$0")/compress.sh $output