Hi, Quoting Johannes Schauer (2020-09-29 08:22:18) > > > $ sudo mmdebstrap --variant=apt --include='systemd-sysv udev' \ > > > > --setup-hook='mkdir -p ./cache.ess "$1"/var/cache/apt/archives' \ > > > > --setup-hook='sync-in ./cache.ess /var/cache/apt/archives' \ > > > > --extract-hook="sync-out /var/cache/apt/archives ./cache.ess" \ > > > > --essential-hook='mkdir -p ./cache.rest "$1"/var/cache/apt/archives' \ > > > > --essential-hook='sync-in ./cache.rest /var/cache/apt/archives' \ > > > > --customize-hook='sync-out /var/cache/apt/archives ./cache.rest' \ > > > > unstable debian-unstable > > > > This is definitely at the level of complexity where it'd be *really > > nice* to just be able to pass `--cache-debs cachedir`, without depending > > deeply on the specific nuance of mmdebstrap's essential/non-essential > > handling (and potential future changes to that). > > This is what the --hook-directory option is for. You put a directory > somewhere, > place scripts in it according to each hook and their order and then run > mmdebstrap like with `--hook-dir cachedir` which is just as short as your > example. :)
thanks to an idea by David Kalnischkies, it's actually much easier. Instead of copying the *.deb archives to /var/cache/apt/archives, they can be copied into /var/cache/apt/archives/partial and then we don't need to keep track of two individual caches: $ sudo mmdebstrap --variant=apt --skip=essential/unlink \ > --setup-hook='mkdir -p ./cache "$1"/var/cache/apt/archives/partial' \ > --setup-hook='sync-in ./cache /var/cache/apt/archives/partial' \ > --customize-hook='rm -r "$1"/var/cache/apt/archives/partial' \ > --customize-hook='sync-out /var/cache/apt/archives ./cache' \ > unstable debian-unstable This needs --skip=essential/unlink which will be part of the next mmdebstrap release. Is there something missing to close this bug with the next release? Thanks! cheers, josch
signature.asc
Description: signature