mkimage-profiles/features.in/cleanup/live/image-scripts.d/90-cleanup-pkgs
Michael Shigorin fa56731d9c cleanup: handle empty variable (ouch!)
This script was completely careless regarding the chance
to meet an empty variable resulting in plain "rpm -qa"
and subsequent attempt to, well, remove *all* packages.

Thanks zerg@ for being persistent this time, even if
he could probably find the culprit and send in this patch.
:)
2016-05-27 16:21:01 +03:00

8 lines
217 B
Bash
Executable File

#!/bin/sh -efu
# remove extra packages from a bare livecd
[ -n "$GLOBAL_CLEANUP_PACKAGES" ] || exit 0
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"
[ -z "$list" ] || apt-get remove -f -y -- $list
: