You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
livecd-rootfs/live-build/ubuntu-core/hooks/600-no-debian.binary

31 lines
621 B

#!/bin/sh
#
# removing debian packaging artifacts
set -ex
echo "I: Removing the debian legacy"
PREFIX=binary/boot/filesystem.dir
# store manifest of all installed packages
(cd $PREFIX
install -m755 -d usr/share/snappy
chroot . dpkg -l > usr/share/snappy/dpkg.list
)
# 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
)