Esempio n. 1
0
 def fake_extract(self):
     self.tmpdir = tempfile.mkdtemp(basename(self.name), '_fakeroot')
     makepaths(self.tmpdir)
     here = os.getcwd()
     os.chdir(self.tmpdir)
     for info in self:
         ipath = info.name
         if info.isdir():
             if not isdir(ipath):
                 makepaths(ipath)
         elif info.isreg():
             file(ipath, 'w')
     os.chdir(here)
Esempio n. 2
0
 def fake_extract(self):
     self.tmpdir = tempfile.mkdtemp(basename(self.name), "_fakeroot")
     makepaths(self.tmpdir)
     here = os.getcwd()
     os.chdir(self.tmpdir)
     for info in self:
         ipath = info.name
         if info.isdir():
             if not isdir(ipath):
                 makepaths(ipath)
         elif info.isreg():
             file(ipath, "w")
     os.chdir(here)
Esempio n. 3
0
def make_tarball(target, tarball_path, name):
    makepaths(tarball_path)
    tarball = open(join(tarball_path, name + '.tar'), 'w:')
    tarball.add(target, './')
    tarball.close()
Esempio n. 4
0
def make_tarball(target, tarball_path, name):
    makepaths(tarball_path)
    tarball = open(join(tarball_path, name + ".tar"), "w:")
    tarball.add(target, "./")
    tarball.close()
Esempio n. 5
0
def make_tarball(target, tarball_path, name):
    makepaths(tarball_path)
    tarball = open(join(tarball_path, name + '.tar'), 'w:')
    tarball.add(target, './')
    tarball.close()