Exemple #1
0
    def write_record(self):
        dist = self.distribution

        options_context = dist.global_context.retrieve_options_context(self.cmd_name)
        cmd_context_klass = dist.global_context.retrieve_context(self.cmd_name)
        context = cmd_context_klass(dist.global_context, [], options_context, dist.pkg, dist.run_node)

        n = context.build_node.make_node(IPKG_PATH)
        ipkg = InstalledPkgDescription.from_file(n.abspath())
        scheme = context.get_paths_scheme()
        ipkg.update_paths(scheme)
        file_sections = ipkg.resolve_paths_with_destdir(src_root_node=context.build_node)

        def writer(fid):
            for kind, source, target in iter_files(file_sections):
                fid.write("%s\n" % target.abspath())
        safe_write(self.record, writer, "w")
Exemple #2
0
 def close(self):
     safe_write(self._location, lambda fd: cPickle.dump(self.db, fd))
Exemple #3
0
 def write_checksums(cls, target=CHECKSUM_DB_FILE):
     def _writer(fd):
         cache = cls()
         cPickle.dump(cPickle.loads(cache.db["bentos_checksums"]),
                      fd)
     safe_write(target, _writer)