[pacman-dev] [PATCH 1/2] pacscripts: don't read the whole package from cache

Karol Blazewicz karol.blazewicz at gmail.com
Mon Jun 17 17:48:38 EDT 2013


'-q' means "Exit as soon as each specified pattern or filename has
been matched." There is no reason to keep reading the whole package
from the cache when the install script has already been printed to
stdout.

Signed-off-by: Karol Błażewicz <karol.blazewicz at gmail.com>
---
 contrib/pacscripts.sh.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/pacscripts.sh.in b/contrib/pacscripts.sh.in
index 8468714..4ecebde 100644
--- a/contrib/pacscripts.sh.in
+++ b/contrib/pacscripts.sh.in
@@ -5,6 +5,7 @@
 #
 #   Copyright (c) 2009 Giulio "giulivo" Fidente <giulivo.navigante at gmail.com>
 #   Copyright (c) 2009 Xavier Chantry <shiningxc at gmail.com>
+#   Copyright (c) 2009-2013 Pacman Development Team <pacman-dev at archlinux.org>
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
@@ -91,7 +91,7 @@ print_db() {
 }
 
 print_pkg() {
-	if ! bsdtar -xOf "$1" .INSTALL 2>/dev/null; then
+	if ! bsdtar -xqOf "$1" .INSTALL 2>/dev/null; then
 		error "Package $1 does not include any .INSTALL script"
 		return 1
 	fi
-- 
1.8.3.1



More information about the pacman-dev mailing list