def _getContent(self): """ """ content = ["%s: %s" % (k, v) for k,v in self.options.iteritems()] #if self.description: # self.description=self.description.replace("\n","\n ") # content.append("Description: %s" % self.description) #if self.changes: # self.changes=self.changes.replace("\n","\n ") # content.append("Changes: %s" % self.changes) if self.BuildDepends: content.append("Build-Depends: %s" % self.BuildDepends) if self.StandardsVersion: content.append("Standards-Version: %s" % self.StandardsVersion) content.append('Files:') for onefile in self.files: print onefile md5=ppkg_md5hash.md5sum(onefile) size=os.stat(onefile).st_size.__str__() content.append(' '+md5 + ' ' + size +' '+os.path.basename(onefile)) print "\n".join(content)+"\n" return "\n".join(content)+"\n\n"
def getContent(self): """ """ content = ["%s: %s" % (k, v) for k, v in self.options.iteritems()] if self.description: description = self.description.replace("\n", "\n ") content.append("Description: ") content.append(" %s" % description) if self.changes: changes = self.changes.replace("\n", "\n ") content.append("Changes: ") content.append(" %s" % changes) if self.ChangedBy: content.append("Changed-By: %s" % self.ChangedBy) content.append("Files:") for onefile in self.files: print onefile md5 = ppkg_md5hash.md5sum(onefile) size = os.stat(onefile).st_size.__str__() content.append( " " + md5 + " " + size + " " + self.category + " " + self.repository + " " + os.path.basename(onefile) ) print "\n".join(content) + "\n" return "\n".join(content) + "\n\n"
def _getContent(self): """ """ content = ["%s: %s" % (k, v) for k,v in self.options.iteritems()] if self.BuildDepends: content.append("Build-Depends: %s" % self.BuildDepends) content.append("Standards-Version: 3.9.2") content.append('Files:') for onefile in self.files: print onefile md5=ppkg_md5hash.md5sum(onefile) size=os.stat(onefile).st_size.__str__() content.append(' '+md5 + ' ' + size +' '+os.path.basename(onefile)) print "\n".join(content)+"\n" return "\n".join(content)+"\n\n"