Navigation Menu

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

GNOME driver does not catch latest version #54

Closed
glensc opened this issue Dec 1, 2014 · 5 comments · Fixed by #118
Closed

GNOME driver does not catch latest version #54

glensc opened this issue Dec 1, 2014 · 5 comments · Fixed by #118
Assignees

Comments

@glensc
Copy link
Contributor

glensc commented Dec 1, 2014

current implementation of gnome driver finds only major version,
but not actual full release, which tarballs are in subdir

ex: https://release-monitoring.org/project/5390/
finds 3.14 from https://download.gnome.org/sources/gnome-power-manager/ dir
but 3.14 latest is 3.14.1 as of this writing: https://download.gnome.org/sources/gnome-power-manager/3.14/

there's cache.json in each project dir: https://download.gnome.org/sources/gnome-power-manager/cache.json

maybe parse that instead?

contains for example:

3.14: [
"LATEST-IS-3.14.1"
],
@pypingou
Copy link
Member

pypingou commented Dec 1, 2014

If the cache.json is always present, that would make things much easier indeed.

@ralphbean
Copy link
Contributor

If the cache.json is always present, that would make things much easier indeed.

Either way, we can look for the cache.json file first to see if it's there. If it is, then use it. If not, fall back to the way things are currently done.

@pypingou
Copy link
Member

Implemented in https://github.com/fedora-infra/anitya/tree/gnome_cache but tbh I am not sure I like it, it seems to make the code more complex than anything.

@ralphbean
Copy link
Contributor

Well, you could break out the part inside the try block into a function with a name to help consolidate it -- make it easier to read:

try:
    use_gnome_cache_json()
except Exception as e:
    log.warning(e)  # Should almost certainly log something about the exception, even if its benign.
    use_gnome_regex()

@glensc
Copy link
Contributor Author

glensc commented Mar 23, 2015

(+1) to ralph suggestion

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

Successfully merging a pull request may close this issue.

3 participants