Skip to content

Commit

Permalink
Merge pull request #900 from htower/master
Browse files Browse the repository at this point in the history
Skip holded packages
  • Loading branch information
sumpfralle committed Feb 21, 2018
2 parents 1649e36 + 8ea8a4c commit f5418e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/ubuntu/apt_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,15 @@ 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)

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
Expand Down

0 comments on commit f5418e4

Please sign in to comment.