Closed seanballais closed 4 years ago
Hi @seanballais
Thanks for submitting this issue. Yes, we recently added pop
there, so I see no problem to add there elementary
too. Would you like to send a PR yourself, as you have already investigated where to add it?
Hey, @memsharded. Sure! I'll send a PR as soon as I can.
okay, maybe we can nail everything down at once, as there are many debian and ubuntu based distributions: https://en.wikipedia.org/wiki/List_of_Linux_distributions#Debian-based https://distrowatch.com/search.php?basedon=Debian#simple https://distrowatch.com/search.php?basedon=Ubuntu%20(LTS)#simple
also, as new distros appear almost every month (it's actually very simple to create your own distro like BolgenOS), maybe we can go away from maintaining a hard-coded distro list, and just verify if apt
exists and it's really apt package manager (not just a random executable named apt).
Checking if apt
itself exists should be a better option. Alright. I'm working on it.
I've just submitted a PR!
@SSE4, perhaps later on, we can stop depending on a hard-coded distro list and have the package manager properties (e.g. with_apt
) check for the existence of the appropriate package manager executable.
elementaryOS is a Linux distro based on Ubuntu. So, it uses
apt
. However, Conan, via theconans
module, disagrees and says that it does not useapt
when callingtools.os_info.with_apt
.Letting Conan know that elementaryOS uses
apt
is important since recipes that have to know whether or not the distro they are running in usesapt
may have to resort to doing something less than ideal when ran under elementaryOS. For example, usingopengl/system
in a project under elementaryOS will fail (just like this in bincrafters/community#1216) because the recipe, as it is currently is (and supported by conan-io/conan-center-index#2114), fails hard when being used in an unrecognized distro.As such, Conan should be updated to recognize elementaryOS as a distro that uses
apt
. Based on my quick skim of theconans
module code, it seems that a change inclient/tools/oss.py:181
to:should do the trick.
Note:
import distro; distro.id()
returns'elementary'
.