summaryrefslogtreecommitdiff
path: root/scripts/build/binary_disk
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2018-02-23 00:00:20 +0000
committerLuca Boccassi <bluca@debian.org>2018-02-23 14:04:59 +0000
commit9a0c6102fdff56da0871bfb1a63cc0349d6317f4 (patch)
tree48377335c9178913db2e8607c78f4415968fc1c6 /scripts/build/binary_disk
parent96e73960b3e64bae81294250e5ad531212ef0ac1 (diff)
downloadvyos-live-build-9a0c6102fdff56da0871bfb1a63cc0349d6317f4.tar.gz
vyos-live-build-9a0c6102fdff56da0871bfb1a63cc0349d6317f4.zip
Fix build with local offline mirrors
Commit a15b579652e64 (#775989) dropped an early exit from the chroot_archives remove step in case the parent mirror chroot and binary parameters are the same and introduced a regression, 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 packages). 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 chroot_archives. 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 umount the local directory at the end of the remove step, rather than at the beginning. Closes: #891206
Diffstat (limited to 'scripts/build/binary_disk')
0 files changed, 0 insertions, 0 deletions