Include size in package lists, sort them

This is done so that it's easy spot large packages that are not
necessary and identify packages that have grown in size too much
by diffing the image compose logs.

  sed "s/rpm -qa/rpm -qa --qf '%{size}\\\\t%{name}-%{version}-%{release}.%{arch}\\\\n' |sort -rn/" -i *.ks
This commit is contained in:
Lubomir Rintel 2020-06-17 13:14:08 +02:00
parent 15f0a6b253
commit 84d28df1b2
8 changed files with 8 additions and 8 deletions

View File

@ -57,7 +57,7 @@ releasever=$(rpm --eval '%{fedora}')
basearch=armhfp basearch=armhfp
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
echo "Packages within this ARM disk image" echo "Packages within this ARM disk image"
rpm -qa rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
# Note that running rpm recreates the rpm db files which aren't needed or wanted # Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*

View File

@ -220,7 +220,7 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
echo "Packages within this cloud image:" echo "Packages within this cloud image:"
echo "-----------------------------------------------------------------------" echo "-----------------------------------------------------------------------"
rpm -qa rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
echo "-----------------------------------------------------------------------" echo "-----------------------------------------------------------------------"
# Note that running rpm recreates the rpm db files which aren't needed/wanted # Note that running rpm recreates the rpm db files which aren't needed/wanted
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*

View File

@ -187,7 +187,7 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
echo "Packages within this cloud image:" echo "Packages within this cloud image:"
echo "-----------------------------------------------------------------------" echo "-----------------------------------------------------------------------"
rpm -qa rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
echo "-----------------------------------------------------------------------" echo "-----------------------------------------------------------------------"
# Note that running rpm recreates the rpm db files which aren't needed/wanted # Note that running rpm recreates the rpm db files which aren't needed/wanted
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*

View File

@ -179,7 +179,7 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
echo "Packages within this cloud image:" echo "Packages within this cloud image:"
echo "-----------------------------------------------------------------------" echo "-----------------------------------------------------------------------"
rpm -qa rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
echo "-----------------------------------------------------------------------" echo "-----------------------------------------------------------------------"
# Note that running rpm recreates the rpm db files which aren't needed/wanted # Note that running rpm recreates the rpm db files which aren't needed/wanted
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*

View File

@ -65,7 +65,7 @@ cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin
releasever=$(rpm --eval '%{fedora}') releasever=$(rpm --eval '%{fedora}')
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
echo "Packages within this disk image" echo "Packages within this disk image"
rpm -qa rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
# Note that running rpm recreates the rpm db files which aren't needed or wanted # Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*

View File

@ -81,7 +81,7 @@ rm -f /var/lib/systemd/random-seed
echo "Packages within this iot image:" echo "Packages within this iot image:"
echo "-----------------------------------------------------------------------" echo "-----------------------------------------------------------------------"
rpm -qa rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
echo "-----------------------------------------------------------------------" echo "-----------------------------------------------------------------------"
# Note that running rpm recreates the rpm db files which aren't needed/wanted # Note that running rpm recreates the rpm db files which aren't needed/wanted
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*

View File

@ -302,7 +302,7 @@ releasever=$(rpm --eval '%{fedora}')
basearch=$(uname -i) basearch=$(uname -i)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
echo "Packages within this LiveCD" echo "Packages within this LiveCD"
rpm -qa rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
# Note that running rpm recreates the rpm db files which aren't needed or wanted # Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*

View File

@ -60,7 +60,7 @@ cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin
releasever=$(rpm --eval '%{fedora}') releasever=$(rpm --eval '%{fedora}')
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
echo "Packages within this disk image" echo "Packages within this disk image"
rpm -qa rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
# Note that running rpm recreates the rpm db files which aren't needed or wanted # Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*