From c1ab9675c5a1f47a8b403dc9cfc15bc86a8a39f9 Mon Sep 17 00:00:00 2001 From: "Gerd v. Egidy" Date: Sun, 8 Nov 2020 19:26:15 +0100 Subject: [PATCH] small runtime improvement to the cowpacman2srm script This prevents trying to create the directories twice by removing duplicate entries from the file list. Saves about 3 seconds of runtime when testing with the "atom" package. --- airootfs/usr/bin/cowpacman2srm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airootfs/usr/bin/cowpacman2srm b/airootfs/usr/bin/cowpacman2srm index 44a4eb9..05e36bf 100755 --- a/airootfs/usr/bin/cowpacman2srm +++ b/airootfs/usr/bin/cowpacman2srm @@ -105,7 +105,7 @@ mkdir -p $TMP_TARGET # read all filenames installed by the packages in COW space # sort to make sure dir names come before files in the dir -pacman -Q --list --quiet $PACKAGENAMES | sort >$PKG_FILELIST +pacman -Q --list --quiet $PACKAGENAMES | sort -u >$PKG_FILELIST if cat $PKG_FILELIST | wc -l | grep -q "^0$"; then echo "ERROR: empty file list for the installed packages"