Skip to content

Commit d18513a

Browse files
hooks: purge packages before creating list of included packages
1 parent 2861647 commit d18513a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hooks/600-no-debian.chroot

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ set -ex
66

77
echo "I: Removing the debian legacy"
88

9+
# dpkg-deb and dpkg purposefully left behind. Ideally we would also remove
10+
# libapt-pkg6.0, but that would break our ABI as unfortunately we shipped it in
11+
# previous revisions of core20.
12+
dpkg --purge --force-depends apt debconf
13+
914
# store manifest of all installed packages
1015
install -m755 -d usr/share/snappy
1116
dpkg -l > usr/share/snappy/dpkg.list
@@ -29,9 +34,6 @@ dpkg -l > usr/share/snappy/dpkg.list
2934
dpkg-query -W --showformat='- ${binary:Package}=${Version}\n'
3035
} > /usr/share/snappy/dpkg.yaml
3136

32-
# dpkg-deb and dpkg purposefully left behind
33-
dpkg --purge --force-depends apt libapt-pkg5.0 debconf
34-
3537
rm -r \
3638
var/lib/dpkg \
3739
var/log/apt

0 commit comments

Comments
 (0)