diff --git a/plugins/ubuntu/apt_ubuntu b/plugins/ubuntu/apt_ubuntu index a54e1008..d13654a3 100755 --- a/plugins/ubuntu/apt_ubuntu +++ b/plugins/ubuntu/apt_ubuntu @@ -116,6 +116,7 @@ if len(sys.argv) > 1: try: import apt + import apt_pkg except ImportError: print "The module 'apt' is currently not installed. You can install it by typing:\nsudo apt-get install python-apt\nImportError: No module named apt" sys.exit(1) @@ -123,7 +124,7 @@ except ImportError: pkgs = {} total = 0 for pkg in apt.Cache(): - if pkg.is_upgradable: + if (pkg.is_upgradable) and (pkg._pkg.selected_state != apt_pkg.SELSTATE_HOLD): a = check_origin(pkg) pkgs[a] = pkgs.get(a, 0) + 1 total += 1