What does everyone think of adding an optional size child element to
the repomd.xml <data> element. I'm thinking something like this
createrepo patch (tested):

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 93d094a..a14bbd1 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)


...which generates things like:

  <data type="primary">
    <checksum type="sha">355dd80c16a91d7f59063274342e4b20d0fda883</checksum>
    <timestamp>1213679813</timestamp>
    <size>327808</size>
    <open-checksum 
type="sha">d7440233906ce9b8779281b09525088771ae6329</open-checksum>
    <location href="repodata/primary.xml.gz"/>
  </data>

-- 
James Antill <[EMAIL PROTECTED]>
Red Hat

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to