From 53dcbdad2b5317487a777b18e0886ee49c8fb311 Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Tue, 23 Jun 2015 16:31:41 -0300 Subject: [PATCH] Removing debian assets from the final image --- .../ubuntu-core/hooks/600-no-debian.binary | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 live-build/ubuntu-core/hooks/600-no-debian.binary diff --git a/live-build/ubuntu-core/hooks/600-no-debian.binary b/live-build/ubuntu-core/hooks/600-no-debian.binary new file mode 100755 index 00000000..5b02e5d9 --- /dev/null +++ b/live-build/ubuntu-core/hooks/600-no-debian.binary @@ -0,0 +1,24 @@ +#!/bin/sh +# +# removing debian packaging artifacts + +set -ex + +echo "I: Removing the debian legacy" + +PREFIX=binary/boot/filesystem.dir + +# dpkg-deb and dpkg purposefully left behind +(cd $PREFIX + chroot . dpkg --purge apt + rm -r \ + var/lib/dpkg \ + var/log/apt + rm \ + usr/bin/dpkg-query \ + usr/bin/dpkg-split \ + usr/bin/dpkg-divert \ + usr/bin/dpkg-trigger \ + usr/bin/dpkg-statoverride \ + usr/bin/dpkg-maintscript-helper +)