#!/bin/sh
# don't cripple the image to be copied over or explicitly requested
# not to do this
[ -n "$GLOBAL_LIVE_NO_CLEANUPDB" ] || \
[ -n "$GLOBAL_LIVE_INSTALL" ] || \
[ -x /usr/sbin/live-install ] || \
[ -x /usr/sbin/livecd-install ] && exit 0
# dump what's here by this point
echo "** live packages before rpmdb purge:"
rpmquery -a --qf='%{NAME} %{VERSION}-%{RELEASE}\n'
# remove apt database and cache
find /var/lib/apt /var/cache/apt -type f -delete
# not going to need them without rpmdb, it's not even rescue anymore
rpm -e --nodeps apt libapt rpm librpmbuild librpm 2>/dev/null ||:
# finally, drop rpmdb
find /var/lib/rpm -type f -delete
:
-
Anton Midyukov authored
This feature complements the live image of the second stage with installation image-specific settings and scripted hooks. It is recommended to connect using +live-installer to ensure that a typical set of installer-related features is included. Unlike the install2 feature, a separate image of the second stage of 'altinst' is not built, but the live image is supplemented with installer packages in order to reduce the total volume of the iso image. Installation consists of two stages: 1. The live image is unpacked, as in livecd-install 2. Install additional packages BASE_PACKAGES and package groups THE_GROUPS as in install2. Unlike install2, only those packages that are not in the live image are placed in the main repository. This is how the size of the iso image is reduced.
2fcfcf92