Beispiel #1
0
 def update_flatrepos(self):
     rpath = self.release.path(section, release=release)
     localpath = path.join(self.backup.source.distpath, rpath)
     url = path.join(self.local.source.distpath, rpath)
     status = self.backup.check_section(section, release=release)
     if status == 'missing':
         makepaths(path.dirname(localpath))
         rfile = get_url(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = get_url(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
 def update_flatrepos(self):
     rpath = self.release.path(section, release=release)
     localpath = path.join(self.backup.source.distpath, rpath)
     url = path.join(self.local.source.distpath, rpath)
     status = self.backup.check_section(section, release=release)
     if status == 'missing':
         makepaths(path.dirname(localpath))
         rfile = get_url(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = get_url(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
Beispiel #3
0
 def _update_section_(self, section, release=False):
     rpath = self.release.path(section, release=release)
     localpath = pjoin(self.local.source.distpath, rpath)
     url = pjoin(self.source.distpath, rpath)
     status = self.local.check_section(section, release=release)
     if status == 'missing':
         makepaths(dirname(localpath))
         rfile = get_url(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = get_url(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
Beispiel #4
0
 def _update_section_(self, section, release=False):
     rpath = self.release.path(section, release=release)
     localpath = pjoin(self.local.source.distpath, rpath)
     url = pjoin(self.source.distpath, rpath)
     status = self.local.check_section(section, release=release)
     if status == 'missing':
         makepaths(dirname(localpath))
         rfile = get_url(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = get_url(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
Beispiel #5
0
 def _update_packagelist_(self, filename='Packages.gz'):
     self.local.parse()
     self.source.sections = self.local.sections
     rpath = pjoin(self.source.uri, self.source.suite, filename)
     lpath = pjoin(self.local.source.distpath, filename)
     packagelist = get_url(rpath)
     self._write_file_(packagelist, lpath)
 def _update_packagelist_(self, filename='Packages.gz'):
     self.backup.parse()
     self.local.source.sections = self.backup.sections
     rpath = path.join(self.local.source.uri, self.local.source.suite, filename)
     lpath = path.join(self.backup.source.distpath, filename)
     packagelist = get_url(rpath)
     self._write_file_(packagelist, lpath)
Beispiel #7
0
 def update_release(self):
     makepaths(self.local.source.distpath)
     localpath = pjoin(self.local.source.distpath, 'Release')
     url = pjoin(self.source.distpath, 'Release')
     release = get_url(url)
     if not isfile(localpath):
         self._write_release_(release, localpath)
     release.seek(0)
     rsum = md5sum(release, keepopen=True)
     lsum = md5sum(file(localpath))
     release.seek(0)
     if lsum != rsum:
         self._write_release_(release, localpath)
     release.seek(0)
     self.local.parse_release()
     self.release = self.local.release
Beispiel #8
0
 def update_release(self):
     makepaths(self.local.source.distpath)
     localpath = pjoin(self.local.source.distpath, 'Release')
     url = pjoin(self.source.distpath, 'Release')
     release = get_url(url)
     if not isfile(localpath):
         self._write_release_(release, localpath)
     release.seek(0)
     rsum = md5sum(release, keepopen=True)
     lsum = md5sum(file(localpath))
     release.seek(0)
     if lsum != rsum:
         self._write_release_(release, localpath)
     release.seek(0)
     self.local.parse_release()
     self.release = self.local.release