~mvo/update-manager/not-automatic

« back to all changes in this revision

Viewing changes to UpdateManager/Core/MetaRelease.py

  • Committer: Michael Vogt
  • Date: 2009-02-16 12:09:28 UTC
  • Revision ID: michael.vogt@ubuntu.com-20090216120928-xrcylim4xrcvo8bq
make backports lower priority than distro updates, ensure that the autoamtic dependency is higher version than the regular one

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    distributions. 
49
49
    """
50
50
 
51
 
    DEBUG = os.environ.has_key("DEBUG_UPDATE_MANAGER")
 
51
    DEBUG = "DEBUG_UPDATE_MANAGER" in os.environ
52
52
 
53
53
    # some constants
54
54
    CONF = "/etc/update-manager/release-upgrades"
62
62
        # information about the available dists
63
63
        self.downloading = True
64
64
        self.new_dist = None
 
65
        self.current_dist_name = get_dist()
65
66
        self.no_longer_supported = None
66
67
 
67
68
        # default (if the conf file is missing)
157
158
 
158
159
    def parse(self):
159
160
        self._debug("MetaRelease.parse()")
160
 
        current_dist_name = get_dist()
 
161
        current_dist_name = self.current_dist_name
 
162
        self._debug("current dist name: '%s'" % current_dist_name)
161
163
        current_dist = None
162
164
        dists = []
163
165
 
234
236
                    os.unlink(self.METARELEASE_FILE)
235
237
                except OSError,e:
236
238
                    print "Can't unlink '%s' (%s)" % (self.METARELEASE_FILE,e)
237
 
            f=open(self.METARELEASE_FILE,"w+")
238
 
            for line in uri.readlines():
239
 
                f.write(line)
240
 
            f.flush()
241
 
            f.seek(0,0)
242
 
            self.metarelease_information=f
 
239
            # we may get excpetion here on e.g. disk full
 
240
            try:
 
241
                f=open(self.METARELEASE_FILE,"w+")
 
242
                for line in uri.readlines():
 
243
                    f.write(line)
 
244
                f.flush()
 
245
                f.seek(0,0)
 
246
                self.metarelease_information=f
 
247
            except IOError, e:
 
248
                pass
243
249
            uri.close()
244
250
        except urllib2.URLError:
245
251
            if os.path.exists(self.METARELEASE_FILE):