{"action":"created","issue":{"url":"https://api.github.com/repos/nir0s/ld/issues/29","repository_url":"https://api.github.com/repos/nir0s/ld","labels_url":"https://api.github.com/repos/nir0s/ld/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/nir0s/ld/issues/29/comments","events_url":"https://api.github.com/repos/nir0s/ld/issues/29/events","html_url":"https://github.com/nir0s/ld/issues/29","id":126027918,"number":29,"title":"Version sometimes looses precision","user":{"login":"andy-maier","id":8939758,"avatar_url":"https://avatars.githubusercontent.com/u/8939758?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-maier","html_url":"https://github.com/andy-maier","followers_url":"https://api.github.com/users/andy-maier/followers","following_url":"https://api.github.com/users/andy-maier/following{/other_user}","gists_url":"https://api.github.com/users/andy-maier/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-maier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-maier/subscriptions","organizations_url":"https://api.github.com/users/andy-maier/orgs","repos_url":"https://api.github.com/users/andy-maier/repos","events_url":"https://api.github.com/users/andy-maier/events{/privacy}","received_events_url":"https://api.github.com/users/andy-maier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-11T20:19:56Z","updated_at":"2016-02-08T14:24:48Z","closed_at":null,"body":"**Problem:**\r\nI have seen one case where the defined priority of first os-release, then lsb_release, then distro release file, causes version() to return just the major version, when the system actually also has a minor version available. So we do not return all possible version detail, i.e. we \"loose some precision\".\r\n\r\nThe case I have seen is Debian 8.2, and that case is actually represented in the new test structure exactly as I have seen it on a real Debian 8.2 system:\r\n\r\n  * /etc/os-release file defining VERSION=8, VERSION_ID=8\r\n  * /etc/debian-version file containing just \"8.2\"\r\n\r\nThe current code simply goes by priority.\r\n\r\n**Solution:**\r\nIf the code would be changed to go by best precision (out of all available sources), this could be addressed. The downside of such a solution is that it makes inconsistencies between the multiple sources even harder to understand, particularly if the inconsistency is not just more or less precision but even contradictions in the version parts that are available in multiple sources).\r\n\r\nI think however, in the end it would be good to use the highest available precision for the version."},"comment":{"url":"https://api.github.com/repos/nir0s/ld/issues/comments/181394213","html_url":"https://github.com/nir0s/ld/issues/29#issuecomment-181394213","issue_url":"https://api.github.com/repos/nir0s/ld/issues/29","id":181394213,"user":{"login":"andy-maier","id":8939758,"avatar_url":"https://avatars.githubusercontent.com/u/8939758?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-maier","html_url":"https://github.com/andy-maier","followers_url":"https://api.github.com/users/andy-maier/followers","following_url":"https://api.github.com/users/andy-maier/following{/other_user}","gists_url":"https://api.github.com/users/andy-maier/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-maier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-maier/subscriptions","organizations_url":"https://api.github.com/users/andy-maier/orgs","repos_url":"https://api.github.com/users/andy-maier/repos","events_url":"https://api.github.com/users/andy-maier/events{/privacy}","received_events_url":"https://api.github.com/users/andy-maier/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T14:24:48Z","updated_at":"2016-02-08T14:24:48Z","body":"This issue is addressed by PR #52."}}