aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Bouchard <louis.bouchard@canonical.com>2014-09-12 13:02:49 +0200
committerAdam Stokes <adam.stokes@ubuntu.com>2014-09-12 09:41:03 -0400
commit06bd56730010f33a2be8d1e8c4182a20881789e2 (patch)
tree6507d93d9a75a31f255eb3971627dd9c63aabbd8
parent70ea7ef14c9cd7474723c1ac5eea1f7163ce13ba (diff)
downloadsos-06bd56730010f33a2be8d1e8c4182a20881789e2.tar.gz
[apt] Add apt-cache policy info for installed pkg
apt-cache policy information for each package can be useful to identify the source of the installed package. Fixes #389 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
-rw-r--r--sos/plugins/apt.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sos/plugins/apt.py b/sos/plugins/apt.py
index 3e83546a..84faf605 100644
--- a/sos/plugins/apt.py
+++ b/sos/plugins/apt.py
@@ -28,11 +28,17 @@ class Apt(Plugin, DebianPlugin, UbuntuPlugin):
"/etc/apt", "/var/log/apt"
])
+ shell_cmd = "sh -c '%s'" % (
+ "dpkg -l | grep ^ii |"
+ "cut -d \" \" -f3 |"
+ "xargs apt-cache policy"
+ )
self.add_cmd_outputs([
"apt-get check",
"apt-config dump",
"apt-cache stats",
- "apt-cache policy"
+ "apt-cache policy",
+ shell_cmd
])
# vim: et ts=4 sw=4