From f0dfd398a6ed425034d8a80231d7bfd4880a4a50 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Thu, 26 May 2022 09:39:48 +0800 Subject: [PATCH] Revert "Reduce image size for lazy installation packages (#10775)" (#10916) This reverts commit 15cf9b0d70b3d839a40a06cec6b6fc10124017ae. Why I did it Revert the PR #10775, for it has impact on onie installation. It is caused by the symbol links not supported in some of the onie unzip. We will enable after fixing the issue, see #10914 --- build_debian.sh | 2 +- files/build_templates/sonic_debian_extension.j2 | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/build_debian.sh b/build_debian.sh index 676c0298ec7d..25f039c90697 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -647,5 +647,5 @@ fi pushd $FILESYSTEM_ROOT && sudo tar czf $OLDPWD/$FILESYSTEM_DOCKERFS -C ${DOCKERFS_PATH}var/lib/docker .; popd ## Compress together with /boot, /var/lib/docker and $PLATFORM_DIR as an installer payload zip file -pushd $FILESYSTEM_ROOT && sudo zip --symlinks $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/ $PLATFORM_DIR/; popd +pushd $FILESYSTEM_ROOT && sudo zip $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/ $PLATFORM_DIR/; popd sudo zip -g -n .squashfs:.gz $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS $FILESYSTEM_DOCKERFS diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 185184fb91d5..659921d50aa9 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -610,9 +610,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT depmod -a {{kversion}} sudo dpkg --root=$FILESYSTEM_ROOT -i {{deb}} || sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f --download-only sudo mkdir -p $FILESYSTEM_ROOT/$PLATFORM_DIR/{{dev}} -sudo mkdir -p $FILESYSTEM_ROOT/$PLATFORM_DIR/common -sudo cp {{ deb }} $FILESYSTEM_ROOT/$PLATFORM_DIR/common/ -sudo ln -sf "../common/{{ debfilename }}" "$FILESYSTEM_ROOT/$PLATFORM_DIR/{{dev}}/{{ debfilename }}" +sudo cp {{ deb }} $FILESYSTEM_ROOT/$PLATFORM_DIR/{{dev}}/ for f in $(find $FILESYSTEM_ROOT/var/cache/apt/archives -name "*.deb"); do sudo mv $f $FILESYSTEM_ROOT/$PLATFORM_DIR/{{dev}}/ done