From 3fde9f313c991aa19fbcedc38a4531de9e838f8d Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 12 Jan 2023 08:05:32 +0100 Subject: debvm-create: also move dpkg's available database to a hook file --- share/customize-dpkgavailable.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 share/customize-dpkgavailable.sh (limited to 'share/customize-dpkgavailable.sh') diff --git a/share/customize-dpkgavailable.sh b/share/customize-dpkgavailable.sh new file mode 100755 index 0000000..f35b81f --- /dev/null +++ b/share/customize-dpkgavailable.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright 2022 Helmut Grohne +# SPDX-License-Identifier: MIT +# +# This is a mmdebstrap customize hook that initializes dpkg's available +# database from an updated apt package list cache. +# +# Without the available database, dpkg --set-selections won't work. + +set -eu + +APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt-cache dumpavail | dpkg --root "$1" --update-avail -- cgit v1.2.3