diff --git a/chroot-script b/chroot-script index 4f68ca7..f768345 100755 --- a/chroot-script +++ b/chroot-script @@ -83,6 +83,14 @@ askpass() { } # }}} +# mark existing packages as automatically installed {{{ +markauto() { + # Mark most leaf packages as automatically installed. + # Later in the systems life, apt autoremove will remove them if possible. + apt-mark auto '~i ~M ?not(~prequired) ?not(~pimportant) ?not(~pstandard)' +} +# }}} + # define chroot mirror {{{ chrootmirror() { if [ "$KEEP_SRC_LIST" = "yes" ] ; then @@ -810,7 +818,7 @@ trap signal_handler HUP INT QUIT TERM # always execute install_policy_rcd install_policy_rcd - for i in chrootmirror grmlrepos backportrepos kernelimg_conf \ + for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf \ kernel packages extrapackages reconfigure hosts \ default_locales timezone fstab install_fs_tools hostname \ initrd grub_install passwords \