3 commits - createrepo/__init__.py

[email protected] (James Antill)
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 createrepo/__init__.py |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit da03e4e2b4b21a5c3646e7781fdb70e63cc6cd8f
Merge: 626908c... e896f24...
Author: James Antill <[email protected]>
Date:   Wed May 13 15:39:57 2009 -0400

    Merge branch 'master' of ssh://yum.baseurl.org/srv/projects/createrepo/git/createrepo
    
    * 'master' of ssh://yum.baseurl.org/srv/projects/createrepo/git/createrepo:
      if our deltarpm dir doesn't exist, don't go looking for it - and definitely

commit 626908ca0761ab09c62967d53a9759c91c73d71a
Merge: 473cb91... 9621629...
Author: James Antill <[email protected]>
Date:   Tue May 5 12:52:19 2009 -0400

    Merge branch 'size-in-repomd.xml'
    
    * size-in-repomd.xml:
      Add size to the repomd.xml output

commit 96216298d90d4e79d46fabae8433611d5f70cf67
Author: James Antill <[email protected]>
Date:   Fri Aug 8 15:49:56 2008 -0400

    Add size to the repomd.xml output

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 93d094a..e12ab23 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -699,6 +699,8 @@ class MetaDataGenerator:
             checksum = data.newChild(None, 'checksum', csum)
             checksum.newProp('type', sumtype)
             timestamp = data.newChild(None, 'timestamp', str(timestamp))
+            size = os.stat(os.path.join(repopath, file))
+            data.newChild(None, 'size', str(size.st_size))
             unchecksum = data.newChild(None, 'open-checksum', uncsum)
             unchecksum.newProp('type', sumtype)
             location = data.newChild(None, 'location', None)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.