Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:cthiel1
createrepo
modifyrepo-prettyxml.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File modifyrepo-prettyxml.patch of Package createrepo
--- modifyrepo.py +++ modifyrepo.py @@ -92,16 +92,25 @@ ## Build the metadata root = self.doc.firstChild + root.appendChild(self.doc.createTextNode(" ")) data = self._insert_element(root, 'data', attrs={ 'type' : mdtype }) + data.appendChild(self.doc.createTextNode("\n ")) + self._insert_element(data, 'location', attrs={ 'href' : 'repodata/' + mdname }) + data.appendChild(self.doc.createTextNode("\n ")) self._insert_element(data, 'checksum', attrs={ 'type' : 'sha' }, text=sha.new(newmd).hexdigest()) + data.appendChild(self.doc.createTextNode("\n ")) self._insert_element(data, 'timestamp', text=str(os.stat(destmd).st_mtime)) + data.appendChild(self.doc.createTextNode("\n ")) self._insert_element(data, 'open-checksum', attrs={ 'type' : 'sha' }, text=sha.new(md).hexdigest()) + data.appendChild(self.doc.createTextNode("\n ")) + root.appendChild(self.doc.createTextNode("\n")) + print " type =", mdtype print " location =", 'repodata/' + mdname print " checksum =", sha.new(newmd).hexdigest() @@ -111,6 +120,7 @@ ## Write the updated repomd.xml outmd = file(self.repomdxml, 'w') self.doc.writexml(outmd) + outmd.write("\n") outmd.close() print "Wrote:", self.repomdxml
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor