Quoting Josh Triplett (2020-09-26 21:47:56) > > so... you want something like this: > > > > $ mmdebstrap --customize-hook='sync-out /var/cache/apt/archives ./cache' > > unstable /dev/null > > $ mmdebstrap --variant=apt --setup-hook='mkdir -p > > "$1"/var/cache/apt/archives' --setup-hook='sync-in ./cache > > /var/cache/apt/archives' unstable output.tar > > > > The first command fills your local directory "./cache" with the contents of > > /var/cache/apt/archives from the first run while the second invocation gets > > the > > contents from that directory and thus is able to operate a bit faster. > > By the time customize-hook runs, mmdebstrap has already cleared > /var/cache/apt/archives, so there's nothing to copy out.
then why is my ./cache directory filled with lots of *.deb files? I tried out the commands above before hitting the send button. > (Also, I'd prefer to use hardlinks, to avoid making unnecessary copies.) This will not work with all modes. I guess you are using root or fakechroot mode? > And it appears that copying the cache in via setup-hook does not end up > taking effect; either something is clearing/invalidating the cache by the > time apt runs, or apt isn't using it. Works fine for me. Strangely it says you are already on the latest mmdebstrap version... hrm... > I'd be happy to do this with hooks, but at the moment, I don't see a way to > do so successfully.
signature.asc
Description: signature