[pacman-dev] [PATCH 15/15] makepkg: remove unnecessary use of sort(1)

Andres P aepd87 at gmail.com
Fri Jun 18 19:51:10 EDT 2010


pacman -Qq output is always sorted!

$ diff -s <(pacman -Qq) <(pacman -Qq | sort)
Files /dev/fd/63 and /dev/fd/62 are identical

Signed-off-by: Andres P <aepd87 at gmail.com>
---
 scripts/makepkg.sh.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 29b5664..e78bcb1 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1872,7 +1872,7 @@ if (( NODEPS || ( (NOBUILD || REPKG) && !DEP_BIN ) )); then
 	fi
 elif type -p "${PACMAN%% *}" >/dev/null; then
 	if (( RMDEPS )); then
-		original_pkglist=($(run_pacman -Qq | sort))    # required by remove_dep
+		original_pkglist=($(run_pacman -Qq))    # required by remove_dep
 	fi
 	deperr=0
 
@@ -1883,7 +1883,7 @@ elif type -p "${PACMAN%% *}" >/dev/null; then
 	resolve_deps ${makedepends[@]} || deperr=1
 
 	if (( RMDEPS )); then
-		current_pkglist=($(run_pacman -Qq | sort))    # required by remove_deps
+		current_pkglist=($(run_pacman -Qq))    # required by remove_deps
 	fi
 
 	if (( deperr )); then
-- 
1.7.1



More information about the pacman-dev mailing list