Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow generating different arches independently #2

Open
pmiess opened this issue Jan 19, 2019 · 2 comments
Open

allow generating different arches independently #2

pmiess opened this issue Jan 19, 2019 · 2 comments

Comments

@pmiess
Copy link

pmiess commented Jan 19, 2019

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.

@bastianeicher
Copy link
Member

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
#...

@pmiess
Copy link
Author

pmiess commented Jan 22, 2019

that is a good work around

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants