Beispiel #1
0
    def unpack(self, clean_dir=True):

        # check archive file's integrity
        if not util.check_file_hash(self.archiveFile, self.archive.sha1sum):
            raise Error, _("unpack: check_file_hash failed")

        archive = pisi.archive.Archive(self.archiveFile, self.archive.type)
        archive.unpack(self.pkg_work_dir, clean_dir)
    def unpack(self, clean_dir=True):

        # check archive file's integrity
        if not util.check_file_hash(self.archiveFile, self.archive.sha1sum):
            raise Error, _("unpack: check_file_hash failed")

        try:
            archive = pisi.archive.Archive(self.archiveFile, self.archive.type)
        except pisi.archive.UnknownArchiveType:
            raise Error(_("Unknown archive type '%s' is given for '%s'.")
                        % (self.archive.type, self.url.filename()))

        target_dir = os.path.join(self.pkg_work_dir, self.archive.target or "")
        archive.unpack(target_dir, clean_dir)
    def unpack(self, target_dir):

        # check archive file's integrity
        if not util.check_file_hash(self.archiveFile, self.archive.sha1sum):
            raise Error, _("unpack: check_file_hash failed")

        try:
            archive = pisi.archive.Archive(self.archiveFile, self.archive.type)
        except pisi.archive.UnknownArchiveType:
            raise Error(_("Unknown archive type '%s' is given for '%s'.") % (self.archive.type, self.url.filename()))
        except pisi.archive.ArchiveHandlerNotInstalled:
            raise Error(_("Pisi needs %s to unpack this archive but it is not installed.") % self.archive.type)

        target_dir = os.path.join(target_dir, self.archive.target or "")
        archive.unpack(target_dir)
 def unpack(self, target_dir):
     for archive in self.sourceArchives:
         archive.unpack(target_dir)
 def unpack(self, clean_dir=True):
     self.sourceArchives[0].unpack(clean_dir)
     for archive in self.sourceArchives[1:]:
         archive.unpack(clean_dir=False)