Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

DEBORPHAN/98-clean-chroot: purge removed packages

Make sure we don't have any removed but not-yet-purged packages left,
otherwise GRMLBASE/03-get-sources might try to download unavailable
packages and will fail doing so.
  • Loading branch information...
commit 193203a7b81d595703d7da56e072d19cb21c5510 1 parent 7deb84c
Michael Prokop mika authored

Showing 1 changed file with 9 additions and 0 deletions. Show diff stats Hide diff stats

  1. +9 0 etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot
9 etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot
@@ -22,5 +22,14 @@ while [ "$($ROOTCMD deborphan)" != "" ] ; do
22 22 $ROOTCMD apt-get -y --purge remove $($ROOTCMD deborphan)
23 23 done
24 24
  25 +# make sure we don't have any removed but not-yet-purged packages left,
  26 +# otherwise GRMLBASE/03-get-sources might try to download unavailable
  27 +# packages and will fail doing so
  28 +PURGE_PACKAGES=$($ROOTCMD dpkg --list | awk '/^rc/ {print $2}')
  29 +
  30 +if [ -n "$PURGE_PACKAGES" ] ; then
  31 + $ROOTCMD dpkg --purge $PURGE_PACKAGES
  32 +fi
  33 +
25 34 ## END OF FILE #################################################################
26 35 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2

0 comments on commit 193203a

Please sign in to comment.
Something went wrong with that request. Please try again.