Esempio n. 1
0
 def export_templates(self, bkup_path):
     for t in self.templates():
         template_id = t.template.replace('/', '-slash-')
         filename = join(bkup_path, 'template-%s' % template_id)
         tfile = self.templatefile(t.template)
         filecopy(tfile, filename)
         tfile.close()
Esempio n. 2
0
 def export_templates(self, bkup_path):
     n = 0
     for t in self.templates():
         npath = join(bkup_path, 'template-%d' % n)
         tfile = self.templatefile(t.package, t.template)
         filecopy(tfile, npath)
         tfile.close()
         n += 1
Esempio n. 3
0
 def export_templates(self, bkup_path):
     n = 0
     for t in self.templates():
         npath = join(bkup_path, 'template-%d' % n)
         tfile = self.templatefile(t.package, t.template)
         filecopy(tfile, npath)
         tfile.close()
         n += 1
Esempio n. 4
0
 def export_templates(self, bkup_path, numbered_templates=False):
     n = 0
     for t in self.templates():
         if numbered_templates:
             filename  = join(bkup_path, 'template-%d' % n)
         else:
             template_id = t.template.replace('/', '-slash-')
             filename = join(bkup_path, 'template-%s' % template_id)
         tfile = self.templatefile(t.template)
         filecopy(tfile, filename)
         tfile.close()
         n += 1
Esempio n. 5
0
 def export_templates(self, bkup_path, numbered_templates=False):
     n = 0
     for t in self.templates():
         if numbered_templates:
             filename = join(bkup_path, 'template-%d' % n)
         else:
             template_id = t.template.replace('/', '-slash-')
             filename = join(bkup_path, 'template-%s' % template_id)
         tfile = self.templatefile(t.template)
         filecopy(tfile, filename)
         tfile.close()
         n += 1
Esempio n. 6
0
 def _update_section_(self, section, release=False):
     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 = file(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = file(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
Esempio n. 7
0
 def update_flatrepos(self):
     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
 def _update_section_(self, section, release=False):
     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 = file(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = file(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
Esempio n. 9
0
 def update_flatrepos(self):
     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
Esempio n. 10
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
Esempio n. 11
0
 def export_scripts(self, bkup_path):
     for row in self.scripts():
         npath = join(bkup_path, 'script-%s' % row.script)
         nfile = self.scriptfile(row.script)
         filecopy(nfile, npath)
         nfile.close()
Esempio n. 12
0
 def export_scripts(self, bkup_path):
     for row in self.scripts():
         npath = join(bkup_path, 'script-%s' % row.script)
         nfile = self.scriptfile(row.script)
         filecopy(nfile, npath)
         nfile.close()