Subject: Metalink: Combine metalink:origin and metalink:dynamic

From: Matthias Fuchs <[email-masked]>
Date: Mon, 21 Dec 2009 12:42:25 +0100

Hi,

I think metalink:dynamic should rather be an attribute of metalink:origin 
instead of an element itself.

The reason for this is that when metalink:dynamic is set to true it is only 
useful if metalink:origin is also defined, while it would be useless if if 
origin was not defined. Making it an attribute would make sure that origin is 
always set when having a dynamic metalink.

Cheers!
matthias

---

From: Anthony Bryan <[email-masked]>
Date: Mon, 21 Dec 2009 14:18:46 -0500

> always set when having a dynamic metalink.

Matthias,

Very logical and fits in. I'm ashamed it wasn't already like this. :)

Current values are true or false. Do you think on/off would be better,
or a numeric value?

This brings up the larger discussion of the XML format, which I would
like to have more people comment/hammer on.

Here is an example following the current draft:

<?xml version="1.0" encoding="utf-8"?>
<metalink xmlns="urn:ietf:params:xml:ns:metalink">
    <published>2009-05-15T18:30:02Z</published>
    <origin dynamic="true">http://releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.meta4</origin>
    <file name="ubuntu-9.04-alternate-amd64.iso">
      <size>732282880</size>
      <publisher name="Ubuntu" url="http://www.ubuntu.com"/>
      <version>9.04</version>
      <description>Ubuntu CD Image</description>
      <logo>http://www.ubuntu.com/themes/ubuntu07/images/ubuntulogo.png</logo>
      <os>Linux</os>
      <hash type="md5">3b5e9861910463374bb0d4ba9025bbb1</hash>
      <metaurl type="torrent"
priority="1">http://releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso.torrent</metaurl>
      <url location="za"
priority="255">http://ftp.leg.uct.ac.za/pub/linux/ubuntu-releases/9.04/ubuntu-9.04-alternate-amd64.iso</url>
      <url location="ls"
priority="70">http://ls.releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso</url>
      <url location="zw"
priority="70">http://zw.releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso</url>
      <url location="na"
priority="70">http://na.releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso</url>
      <url location="nl"
priority="60">ftp://ftpserv.tudelft.nl/pub/Linux/releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso</url>
    </file>
</metalink>

And here's an example from our older, community spec:

 <?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" pubdate="Thu, 23 Apr 2009 08:37:53 +0000"
xmlns="http://www.metalinker.org/">
  <publisher>
    <name>Ubuntu</name>
    <url>http://www.ubuntu.com/</url>
  </publisher>
  <version>9.04</version>
  <description>Ubuntu CD Image</description>
  <logo>http://www.ubuntu.com/themes/ubuntu07/images/ubuntulogo.png</logo>
  <files>
    <file name="ubuntu-9.04-alternate-amd64.iso">
      <size>732282880</size>
      <os>Linux-x64</os>
      <verification>
        <hash type="md5">3b5e9861910463374bb0d4ba9025bbb1</hash>
      </verification>
      <resources>
	    <url type="bittorrent"
preference="100">http://releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso.torrent</url>
	    <url type="http" location="sz"
preference="70">http://sz.releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso</url>
	    <url type="http" location="mz"
preference="70">http://mz.releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso</url>
	    <url type="http" location="bw"
preference="70">http://bw.releases.ubuntu.com/9.04/ubuntu-9.04-alternate-amd64.iso</url>
	    <url type="http" location="il"
preference="70">http://ubuntu.interhost.co.il/9.04/ubuntu-9.04-alternate-amd64.iso</url>
	    <url type="ftp" location="id"
preference="80">ftp://dl2.foss-id.web.id/iso/ubuntu/releases/9.04/ubuntu-9.04-alternate-amd64.iso</url>
      </resources>
    </file>
  </files>
</metalink>

-- 
(( Anthony Bryan ... Metalink [ http://www.metalinker.org ]
  )) Easier, More Reliable, Self Healing Downloads

---

From: Matthias Fuchs <[email-masked]>
Date: Tue, 22 Dec 2009 13:18:25 +0100

Am Montag 21 Dezember 2009 20:18:46 schrieb Anthony Bryan:
> > The reason for this is that when metalink:dynamic is set to true it is
> > only useful if metalink:origin is also defined, while it would be useless
> > if if origin was not defined. Making it an attribute would make sure that
> > origin is always set when having a dynamic metalink.
> 
> Matthias,
> 

Personally I think we should use true and false.