Description: Tidy up linux-headers installation and duplication ubuntu-chroot_headers_tidy.patch: Mark all the linux-headers-$(ABI) packages as autoinstalled, and then autoremove cruft (LP: #1029556) Author: Adam Conrad Bug-Ubuntu: https://bugs.launchpad.net/bugs/1029556 Forwarded: no Last-Update: 2012-08-20 Index: b/scripts/build/lb_chroot =================================================================== --- a/scripts/build/lb_chroot +++ b/scripts/build/lb_chroot @@ -62,6 +62,12 @@ if [ "${_PASS}" = install ] then + Chroot chroot "dpkg -l linux-headers-3* linux-headers-4*" 2>/dev/null \ + | awk '/^i/ {print $2}' > chroot.headers + for i in $(cat chroot.headers); do + Chroot chroot "apt-mark auto $i" + done + Chroot chroot "apt-get --purge -y autoremove" Chroot chroot "dpkg-query -W" > chroot.packages.install fi done Index: b/scripts/build/lb_clean =================================================================== --- a/scripts/build/lb_clean +++ b/scripts/build/lb_clean @@ -88,6 +88,7 @@ ${LB_ROOT_COMMAND} rm -rf chroot chroot.tmp rm -f chroot.packages.live chroot.packages.install + rm -f chroot.headers rm -f .build/chroot* ;;