From abc5d7730c660f8e415f52a89b7dd35b938ad206 Mon Sep 17 00:00:00 2001 From: Alex Tu Date: Thu, 26 Oct 2017 14:07:25 +0800 Subject: [PATCH] counting on dpkg --print-architecture to filter out architecture postfix from package name. (#47) Signed-off-by: Alex Tu --- late/scripts/chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/late/scripts/chroot.sh b/late/scripts/chroot.sh index 31153f56..2fd441bd 100755 --- a/late/scripts/chroot.sh +++ b/late/scripts/chroot.sh @@ -146,7 +146,7 @@ fi #check the packages installed or not if [ -f "$TARGET/tmp/apt-installed" ]; then mv $TARGET/tmp/apt-installed $TARGET/var/lib/ubiquity/dell-apt - sed 's/:amd64//g' $TARGET/var/lib/ubiquity/installed-packages > $TARGET/var/lib/ubiquity/installed-packages-filtered + sed "s/:$(dpkg --print-architecture)//g" $TARGET/var/lib/ubiquity/installed-packages > $TARGET/var/lib/ubiquity/installed-packages-filtered grep -x -f $TARGET/var/lib/ubiquity/dell-apt $TARGET/var/lib/ubiquity/installed-packages-filtered > $TARGET/var/lib/ubiquity/dell_installed awk '{print $0}' $TARGET/var/lib/ubiquity/dell-apt $TARGET/var/lib/ubiquity/dell_installed |sort |uniq -u > $TARGET/var/lib/ubiquity/dell_uninstalled fi