summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-05-05 01:56:36 +0100
committerLyndon Brown <jnqnfe@gmail.com>2020-05-05 19:43:15 +0100
commitf27d13de08af9ae788b0d2f848e2202a399e4f43 (patch)
tree1165ce57a756aec4f8def2e684c6e77e05b654eb /debian
parenta065e60043fc5ff217be0be90191305d8ade2518 (diff)
downloadvyos-live-build-f27d13de08af9ae788b0d2f848e2202a399e4f43.tar.gz
vyos-live-build-f27d13de08af9ae788b0d2f848e2202a399e4f43.zip
make temporary state of installed tools recoverable
some scripts temporarily install packages to accomplish some work before then removing them. the list of packages installed is kept in memory in a variable. a weakness of this design is that if a failure occurs or the user cancels, and then following this the user re-runs `lb build`, letting it try to pick up and recover from where it left off, that list of packages that had been installed is lost, resulting in those packages that were installed then being a permanent part of the chroot. here we fix this weakness by backing up the list to a file, which is always read from on removal. thus in a recovery situation, any packages still installed from a situation like that just described, will be removed upon the next use of `Remove_package()`. this is not perfect, since we are having to wait for opportunistic execution of the remove function. we need to find a suitable place for the `Cleanup_temp_packages()` function to be used. - doing so in `Init_config_data()` would not be suitable because we don't hold the lock when that's run, even if we ignored the hijacking of that function for taking such action... - doing it in `Exit()` doesn't seem a good fit either. - putting it explicitly in every build script just seems a little messy... perhaps a local exit trap like for removing the lock...? note that `binary_rootfs` skips running the remove function after installing tooling, since it just throws the wrapper chroot away, which then leaves the file around with stale data for the next remove instance to pick up, which then does not actually remove it because it's not installed. this is not ideal either... perhaps the optimisation should be removed from that script? Gbp-Dch: Short
Diffstat (limited to 'debian')
0 files changed, 0 insertions, 0 deletions