1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -05:00

pacscripts: don't read the whole package from cache

'-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>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Karol Blazewicz 2013-06-17 23:48:38 +02:00 committed by Allan McRae
parent 31d51052e1
commit 85fde7038f

View File

@ -5,6 +5,7 @@
# #
# Copyright (c) 2009 Giulio "giulivo" Fidente <giulivo.navigante@gmail.com> # Copyright (c) 2009 Giulio "giulivo" Fidente <giulivo.navigante@gmail.com>
# Copyright (c) 2009 Xavier Chantry <shiningxc@gmail.com> # Copyright (c) 2009 Xavier Chantry <shiningxc@gmail.com>
# Copyright (c) 2009-2013 Pacman Development Team <pacman-dev@archlinux.org>
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -91,7 +92,7 @@ print_db() {
} }
print_pkg() { 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" error "Package $1 does not include any .INSTALL script"
return 1 return 1
fi fi