Open pmiess opened 5 years ago
I'm a bit worried such a feature would add a lot of complexity to the tool for a rather rare use case.
However, it should be possible to achieve the same goal using multiple architecture-specific feeds referenced by a single master feed instead.
For example:
infozip.xml
:
<interface uri="http://example.com/infozip.xml" xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
<name>Info-ZIP</name>
<summary>a ZIP tool</summary>
<feed arch="Linux-i486" src="http://example.com/infozip-linux-i486.xml"/>
<feed arch="Linux-x86_64" src="http://example.com/infozip-linux-x86_64.xml"/>
</interface>
infozip-linux-i486.xml
:
<interface uri="http://example.com/infozip-linux-i486.xml" xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
<feed-for interface="http://example.com/infozip.xml"/>
<!-- ... -->
</interface>
infozip-linux-i486.xml.template
:
<interface xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
<feed-for interface="http://example.com/infozip-linux-i486.xml"/>
<implementation arch="Linux-i486" version="{version}">
<!-- ... -->
</implementation>
</interface>
infozip-linux-i486.watch.py
:
from urllib import request
#...
infozip-linux-x86_64.xml
:
<interface uri="http://example.com/infozip-linux-x86_64.xml" xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
<feed-for interface="http://example.com/infozip.xml"/>
<!-- ... -->
</interface>
infozip-linux-x86_64.xml.template
:
<interface xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
<feed-for interface="http://example.com/infozip-linux-x86_64.xml"/>
<implementation arch="Linux-x86_64" version="{version}">
<!-- ... -->
</implementation>
</interface>
infozip-linux-x86_64.watch.py
:
from urllib import request
#...
that is a good work around
It would be useful to allow generating feeds for the same version on different arches, if the source your downloading from does not generate all the archives for all the arches at the same time.
An example of this would be info-zip which depends on third parties to generate binaries. The latest version 64 bit build was built more than a year after the 32 bit build.
I would like to be able to run 0watch and have it find that the linux-i386 version 1 is not generated yet , but the linux-x86_64 and windows-i386 version 1 feeds have been.
I can make the version variable include the arch to work around this. But, unless I push the arch into the version attribute of the feed file, extra downloads are generated.