dpkg: Suppress unwanted error messages (Debian: #706502)

This commit is contained in:
Igor Murzov 2013-07-23 02:37:20 +04:00
parent ad455dfa9d
commit 9ca8d933c6

View File

@ -8,11 +8,11 @@ _comp_dpkg_installed_packages()
} || { } || {
_comp_dpkg_installed_packages() _comp_dpkg_installed_packages()
{ {
command grep -A 1 "Package: $1" /var/lib/dpkg/status | \ command grep -A 1 "Package: $1" /var/lib/dpkg/status 2>/dev/null | \
command grep -B 1 -Ee "ok installed|half-installed|unpacked| \ command grep -B 1 -Ee "ok installed|half-installed|unpacked| \
half-configured" \ half-configured" \
-Ee "^Essential: yes" | \ -Ee "^Essential: yes" | \
command grep "Package: $1" | cut -d\ -f2 command grep "Package: $1" 2>/dev/null | cut -d\ -f2
} }
} }
@ -24,11 +24,11 @@ _comp_dpkg_purgeable_packages()
} || { } || {
_comp_dpkg_purgeable_packages() _comp_dpkg_purgeable_packages()
{ {
command grep -A 1 "Package: $1" /var/lib/dpkg/status | \ command grep -A 1 "Package: $1" /var/lib/dpkg/status 2>/dev/null | \
command grep -B 1 -Ee "ok installed|half-installed|unpacked| \ command grep -B 1 -Ee "ok installed|half-installed|unpacked| \
half-configured|config-files" \ half-configured|config-files" \
-Ee "^Essential: yes" | \ -Ee "^Essential: yes" | \
command grep "Package: $1" | cut -d\ -f2 command grep "Package: $1" 2>/dev/null | cut -d\ -f2
} }
} }