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:
parent
15f0a6b253
commit
84d28df1b2
@ -57,7 +57,7 @@ releasever=$(rpm --eval '%{fedora}')
|
||||
basearch=armhfp
|
||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
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
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
||||
|
@ -220,7 +220,7 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
|
||||
echo "Packages within this cloud image:"
|
||||
echo "-----------------------------------------------------------------------"
|
||||
rpm -qa
|
||||
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
|
||||
echo "-----------------------------------------------------------------------"
|
||||
# Note that running rpm recreates the rpm db files which aren't needed/wanted
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
@ -187,7 +187,7 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
|
||||
echo "Packages within this cloud image:"
|
||||
echo "-----------------------------------------------------------------------"
|
||||
rpm -qa
|
||||
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
|
||||
echo "-----------------------------------------------------------------------"
|
||||
# Note that running rpm recreates the rpm db files which aren't needed/wanted
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
@ -179,7 +179,7 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
|
||||
echo "Packages within this cloud image:"
|
||||
echo "-----------------------------------------------------------------------"
|
||||
rpm -qa
|
||||
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
|
||||
echo "-----------------------------------------------------------------------"
|
||||
# Note that running rpm recreates the rpm db files which aren't needed/wanted
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
@ -65,7 +65,7 @@ cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin
|
||||
releasever=$(rpm --eval '%{fedora}')
|
||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
|
||||
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
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
||||
|
@ -81,7 +81,7 @@ rm -f /var/lib/systemd/random-seed
|
||||
|
||||
echo "Packages within this iot image:"
|
||||
echo "-----------------------------------------------------------------------"
|
||||
rpm -qa
|
||||
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
|
||||
echo "-----------------------------------------------------------------------"
|
||||
# Note that running rpm recreates the rpm db files which aren't needed/wanted
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
@ -302,7 +302,7 @@ releasever=$(rpm --eval '%{fedora}')
|
||||
basearch=$(uname -i)
|
||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
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
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
||||
|
@ -60,7 +60,7 @@ cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin
|
||||
releasever=$(rpm --eval '%{fedora}')
|
||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
|
||||
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
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user