Skip to content

Commit

Permalink
make virtual package detection more robust in __package_apt
Browse files Browse the repository at this point in the history
  • Loading branch information
evax committed Jan 18, 2012
1 parent e4100e3 commit 9317d57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conf/type/__package_apt/explorer/pkg_status
Expand Up @@ -28,7 +28,7 @@ else
fi fi


# Except dpkg failing, if package is not known / installed # Except dpkg failing, if package is not known / installed
packages="$(apt-cache showpkg "$name" | grep -A 20 "Reverse Provides:" | sed 1d | cut -d ' ' -f 1) $name" packages="$(apt-cache showpkg "$name" | sed -e "1,/Reverse Provides:/d" | cut -d ' ' -f 1) $name"
for p in $packages; do for p in $packages; do
if [ -n "$(dpkg -s "$p" 2>/dev/null | grep "^Status: install ok installed$")" ]; then if [ -n "$(dpkg -s "$p" 2>/dev/null | grep "^Status: install ok installed$")" ]; then
echo "installed $p" echo "installed $p"
Expand Down

1 comment on commit 9317d57

@telmich
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a beautiful one now!

Please sign in to comment.