~mvo/update-manager/not-automatic

« back to all changes in this revision

Viewing changes to UpdateManager/Core/UpdateList.py

  • Committer: Michael Vogt
  • Date: 2009-02-16 10:30:51 UTC
  • mfrom: (1256.1.14 main)
  • Revision ID: michael.vogt@ubuntu.com-20090216103051-m2aa2cgx0s2facxh
merge from the mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
      matcher[(None,None)] = self.UpdateOrigin(_("Other updates"), -1)
69
69
      return matcher
70
70
 
71
 
  def _has_automatic_origin(self, pkg):
72
 
    for ver in pkg._pkg.VersionList:
73
 
      print "looking at: ", ver
74
 
      for (verFileIter, index) in ver.FileList:
75
 
        if verFileIter.NotAutomatic:
76
 
          return True
77
 
    return False
78
 
 
79
71
  def update(self, cache):
80
72
    self.held_back = []
81
73
 
98
90
          self.pkgs[origin_node] = []
99
91
        self.pkgs[origin_node].append(pkg)
100
92
        self.num_updates = self.num_updates + 1
101
 
      if (pkg.isInstalled and not pkg.isUpgradable and
102
 
            pkg.candidateOrigin and self._has_automatic_origin(pkg)):
103
 
        print "upgradable, but not automatic: ", pkg.name
104
 
        label = self.UpdateOrigin("Not automatic", 1)
105
 
        if not label in self.pkgs:
106
 
          self.pkgs[label] = []
107
 
        self.pkgs[label].append(pkg)
108
93
      if pkg.isUpgradable and not (pkg.markedUpgrade or pkg.markedInstall):
109
94
          self.held_back.append(pkg.name)
110
95
    for l in self.pkgs.keys():
111
96
      self.pkgs[l].sort(lambda x,y: cmp(x.name,y.name))
112
97
    self.keepcount = cache._depcache.KeepCount
113
 
    print self.held_back
 
98