Package: live-build
Version: 1:20161202
Tags: patch
Severity: normal

Dear Maintainer,

Commit a15b5796 (#775989) [1] dropped an early exit from the
chroot_archives remove step in case the parent mirror chroot and binary
parameters are the same and unfortunately introduced a regression in an
(infrequent) corner case, as with the following live-build now fails
when the parent mirror is using a file:/ local apt repository (for
example when the build worker is offline and uses a pre-built cache of

Example config:

lb config --mirror-bootstrap "file:/pkgs" \
    --mirror-chroot "file:/pkgs/" \
    --mirror-binary "file:/pkgs" \
    --parent-mirror-bootstrap "file:/pkgs" \
    --parent-mirror-chroot "file:/pkgs/" \
    --parent-mirror-binary "file:/pkgs" \

with /pkgs being a directory with the packages for the installation and
the apt metadata (Packages/Sources/Release).

The problem is that, with such a setup, the /pkgs directory is bind
mounted inside the chroot as an optimisation in the install step,
and umounted as one of the first actions in the remove step for

Before that fix, the script terminated immediately. But now it
progresses and at the end it tries to run apt update inside the chroot
which will fail since the repository directory has been umounted, and
thus the packages and the apt metadata are no longer available, while
still being listed in /etc/apt/sources.list.

The proposed solution is to avoid running apt update in the chroot at
the end of the chroot_archives remove step if the repository is local
and has been umounted.

A PR [2] has been opened on Salsa with the proposed fix. Please let me
know if you'd like more information or a different solution.


Kind regards,
Luca Boccassi


Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to