diff options
author | Raphaël Hertzog <raphael@offensive-security.com> | 2019-12-19 16:53:30 +0100 |
---|---|---|
committer | Raphaël Hertzog <raphael@offensive-security.com> | 2019-12-19 16:53:30 +0100 |
commit | bca7af4ecb24f93fe638a39931b601883600d111 (patch) | |
tree | 8f34b6e6fba6c3a2c0fc585ff0e5fd6da3de1585 /scripts/build/installer_debian-installer | |
parent | 15c46fa15273f7302964291e767af33a2cdf2334 (diff) | |
download | vyos-live-build-bca7af4ecb24f93fe638a39931b601883600d111.tar.gz vyos-live-build-bca7af4ecb24f93fe638a39931b601883600d111.zip |
installer_debian-installer: don't mess with /var/lib/dpkg/status
Use a similar trick as for chroot_live-packages.
Relates to #944983.
Diffstat (limited to 'scripts/build/installer_debian-installer')
-rwxr-xr-x | scripts/build/installer_debian-installer | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer index ec931fa68..3a477a8f1 100755 --- a/scripts/build/installer_debian-installer +++ b/scripts/build/installer_debian-installer @@ -311,9 +311,6 @@ then # Downloading additional packages mkdir -p chroot/binary.deb/archives/partial - mv chroot/var/lib/dpkg/status chroot/var/lib/dpkg/status.tmp - touch chroot/var/lib/dpkg/status - case "${LB_ARCHITECTURES}" in amd64) DI_REQ_PACKAGES="lilo grub-pc" @@ -401,7 +398,7 @@ then fi # Set apt command prefix - _LB_APT_COMMAND="apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb -o APT::Install-Recommends=false --download-only" + _LB_APT_COMMAND="apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb -o Dir::State::status=/dev/null -o APT::Install-Recommends=false --download-only" if [ "${LB_DEBIAN_INSTALLER}" = "live" ] then @@ -417,7 +414,7 @@ then # Drop the packages already installed that d-i doesn't explicitely need _REMAINING_PACKAGES="$(echo ${DI_FIRMWARE_PACKAGES} ${DI_REQ_PACKAGES} | sed -e 's# #|#g')" - _REMAINING_PACKAGES="$(sed -n -e 's|Package: ||p' chroot/var/lib/dpkg/status.tmp | grep -E -v "^(${_REMAINING_PACKAGES})\$")" + _REMAINING_PACKAGES="$(Chroot_package_list chroot | grep -E -v "^(${_REMAINING_PACKAGES})\$")" for _PACKAGE in ${_REMAINING_PACKAGES} do @@ -428,9 +425,6 @@ then Chroot chroot ${_LB_APT_COMMAND} install ${DI_PACKAGES} ${DI_FIRMWARE_PACKAGES} fi - # Revert dpkg status file - mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status - mv chroot/binary.deb ./ for _ARCHIVE_AREA in $(echo ${LB_PARENT_ARCHIVE_AREAS} ${LB_ARCHIVE_AREAS}) |