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 = Archive(self.archiveFile, self.archive.type) archive.unpack(self.bctx.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: archive file integrity is compromised") archive = Archive(self.archiveFile, self.archive.type) archive.unpack(self.pkg_work_dir, clean_dir)
def unpack(self, cleanDir=True): # check archive file's integrity if not util.check_file_hash(self.archiveFile, self.archiveSHA1): raise SourceArchiveError, "unpack: check_file_hash failed" archive = Archive(self.archiveFile, self.archiveType) archive.unpack(self.bctx.pkg_work_dir(), cleanDir)
def unpack(self, clean_dir=True, target_dir=None): ctx.ui.debug("unpack: %s, %s" % (self.archiveFile, self.archive.sha1sum)) # check archive file's integrity if not util.check_file_hash(self.archiveFile, self.archive.sha1sum): raise Error, _("Unpack: archive file integrity is compromised") archive = Archive(self.archiveFile, self.archive.type) unpack_dir = self.pkg_work_dir if self.archive.norootdir == "true": os.makedirs(target_dir) unpack_dir = target_dir archive.unpack(unpack_dir, clean_dir)