cleanup: Add GLOBAL_LIVE_NO_CLEANUPDB support

If set then don't remove apt and rpm from live images.
This commit is contained in:
Mikhail Efremov 2017-05-03 16:57:03 +03:00 committed by Michael Shigorin
parent 2af6d0be75
commit 85a7258d69
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,6 @@
use/cleanup:
@$(call add_feature)
@$(call xport,GLOBAL_LIVE_NO_CLEANUPDB)
@$(call xport,CLEANUP_PACKAGES)
@$(call xport,CLEANUP_BASE_PACKAGES)

View File

@ -1,7 +1,10 @@
#!/bin/sh
# don't cripple the image to be copied over
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0
# don't cripple the image to be copied over or explicitly requested
# not to do this
[ -n "$GLOBAL_LIVE_NO_CLEANUPDB" ] || \
[ -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:"