From 95c970f52f393f4fa5460e83cddf2f8207ee94e9 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 13 Oct 2014 16:29:52 +0100 Subject: [PATCH] Take a different approach to working around deduplication cleverness in click, this time hopefully without breaking hooks. --- .../hooks/60-install-click.chroot | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot index 626aad3b..d8be455b 100755 --- a/live-build/ubuntu-touch/hooks/60-install-click.chroot +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -16,15 +16,8 @@ chown clickpkg:clickpkg "$click_db" mkdir -p -m 755 "$click_db_custom" chown clickpkg:clickpkg "$click_db_custom" -# move default configuration aside to stop click being clever about symlink -# layering -mv /etc/click/databases /etc/click/databases.tmp - tmpdir="$(mktemp -d)" -cleanup () { - rm -rf "$tmpdir" - mv /etc/click/databases.tmp /etc/click/databases -} +cleanup () { rm -rf "$tmpdir"; } trap cleanup EXIT CLICKARCH=$(dpkg --print-architecture) @@ -55,8 +48,20 @@ do ;; esac for root in $roots; do + if [ "$root" = "$click_db_custom" ]; then + # FIXME: there is no good way to stop click from + # deduplicating things when installing the same package in + # multiple databases; the best we can do is to temporarily + # pretend that the core database does not exist + mv /etc/click/databases/10_core.conf \ + /etc/click/databases/10_core.conf.tmp + fi click install --force-missing-framework --root="$root" --all-users \ "$tmpdir/$package" + if [ "$root" = "$click_db_custom" ]; then + mv /etc/click/databases/10_core.conf.tmp \ + /etc/click/databases/10_core.conf + fi done fi done